Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[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  *   forms = {
15  *     "settings_tray" = FALSE,
16  *   },
17  * )
18  */
19 class SystemMainBlock extends BlockBase implements MainContentBlockPluginInterface {
20
21   /**
22    * The render array representing the main page content.
23    *
24    * @var array
25    */
26   protected $mainContent;
27
28   /**
29    * {@inheritdoc}
30    */
31   public function setMainContent(array $main_content) {
32     $this->mainContent = $main_content;
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public function build() {
39     return $this->mainContent;
40   }
41
42 }