public function BlockPageVariant::setMainContent in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php \Drupal\block\Plugin\DisplayVariant\BlockPageVariant::setMainContent()
Sets the main content for the page being rendered.
Parameters
array $main_content: The render array representing the main content.
Return value
$this
Overrides PageVariantInterface::setMainContent
File
- core/
modules/ block/ src/ Plugin/ DisplayVariant/ BlockPageVariant.php, line 109
Class
- BlockPageVariant
- Provides a page display variant that decorates the main content with blocks.
Namespace
Drupal\block\Plugin\DisplayVariantCode
public function setMainContent(array $main_content) {
$this->mainContent = $main_content;
return $this;
}