You are here

public function DashboardLazyBuildBase::buildRenderArray in Dashboards with Layout Builder 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/DashboardLazyBuildBase.php \Drupal\dashboards\Plugin\DashboardLazyBuildBase::buildRenderArray()

Build render array.

Parameters

array $configuration: Plugin configuration.

Return value

array Return render array.

Overrides DashboardBase::buildRenderArray

File

src/Plugin/DashboardLazyBuildBase.php, line 24

Class

DashboardLazyBuildBase
Abstract class helper for lazy builds.

Namespace

Drupal\dashboards\Plugin

Code

public function buildRenderArray($configuration) : array {
  return [
    '#lazy_builder' => [
      static::class . '::lazyBuildPreRender',
      [
        $this
          ->getPluginId(),
        Json::encode($configuration),
      ],
    ],
    '#create_placeholder' => TRUE,
  ];
}