public function PanelsDisplayVariant::build in Panels 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/DisplayVariant/PanelsDisplayVariant.php \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant::build()
Builds and returns the renderable array for the display variant.
The variant can contain cacheability metadata for the configuration that was passed in setConfiguration(). In the build() method, this should be added to the render array that is returned.
Return value
array A render array for the display variant.
Overrides VariantInterface::build
File
- src/
Plugin/ DisplayVariant/ PanelsDisplayVariant.php, line 331
Class
- PanelsDisplayVariant
- Provides a display variant that simply contains blocks.
Namespace
Drupal\panels\Plugin\DisplayVariantCode
public function build() {
$build = $this
->getBuilder()
->build($this);
$build['#title'] = $this
->renderPageTitle($this->configuration['page_title']);
// Allow other module to alter the built panel.
$this->moduleHandler
->alter('panels_build', $build, $this);
return $build;
}