comparison core/modules/system/src/Plugin/Block/SystemMainBlock.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 1fec387a4317
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\system\Plugin\Block;
4
5 use Drupal\Core\Block\BlockBase;
6 use Drupal\Core\Block\MainContentBlockPluginInterface;
7
8 /**
9 * Provides a 'Main page content' block.
10 *
11 * @Block(
12 * id = "system_main_block",
13 * admin_label = @Translation("Main page content")
14 * )
15 */
16 class SystemMainBlock extends BlockBase implements MainContentBlockPluginInterface {
17
18 /**
19 * The render array representing the main page content.
20 *
21 * @var array
22 */
23 protected $mainContent;
24
25 /**
26 * {@inheritdoc}
27 */
28 public function setMainContent(array $main_content) {
29 $this->mainContent = $main_content;
30 }
31
32 /**
33 * {@inheritdoc}
34 */
35 public function build() {
36 return $this->mainContent;
37 }
38
39 }