function MainContentBlockPluginInterface::setMainContent

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php \Drupal\Core\Block\MainContentBlockPluginInterface::setMainContent()
  2. 10 core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php \Drupal\Core\Block\MainContentBlockPluginInterface::setMainContent()
  3. 11.x core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php \Drupal\Core\Block\MainContentBlockPluginInterface::setMainContent()

Sets the main content render array.

Parameters

array $main_content: The render array representing the main content.

1 method overrides MainContentBlockPluginInterface::setMainContent()
SystemMainBlock::setMainContent in core/modules/system/src/Plugin/Block/SystemMainBlock.php
Sets the main content render array.

File

core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php, line 20

Class

MainContentBlockPluginInterface
The interface for "main page content" blocks.

Namespace

Drupal\Core\Block

Code

public function setMainContent(array $main_content);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.