You are here

private function ContextBlockPageVariant::getBuildFromBlockLayout in Context 8.4

Same name and namespace in other branches
  1. 8 src/Plugin/DisplayVariant/ContextBlockPageVariant.php \Drupal\context\Plugin\DisplayVariant\ContextBlockPageVariant::getBuildFromBlockLayout()

Get build from Block layout.

1 call to ContextBlockPageVariant::getBuildFromBlockLayout()
ContextBlockPageVariant::build in src/Plugin/DisplayVariant/ContextBlockPageVariant.php
Builds and returns the renderable array for the display variant.

File

src/Plugin/DisplayVariant/ContextBlockPageVariant.php, line 184

Class

ContextBlockPageVariant
Provides a page display variant that decorates the main content with blocks.

Namespace

Drupal\context\Plugin\DisplayVariant

Code

private function getBuildFromBlockLayout() {
  $display_variant = $this->displayVariant
    ->createInstance('block_page', $this->displayVariant
    ->getDefinition('block_page'));
  $display_variant
    ->setTitle($this->title);
  $display_variant
    ->setMainContent($this->mainContent);
  return $display_variant
    ->build();
}