You are here

public function TestDisplayVariant::setMainContent in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::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/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php, line 69

Class

TestDisplayVariant
Provides a display variant that requires configuration.

Namespace

Drupal\display_variant_test\Plugin\DisplayVariant

Code

public function setMainContent(array $main_content) {
  $this->mainContent = $main_content;
  return $this;
}