Version 1
[yaffs-website] / web / core / modules / system / src / Plugin / Block / SystemMainBlock.php
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 }