public static function DashboardLazyBuildBase::lazyBuildPreRender in Dashboards with Layout Builder 8
Same name and namespace in other branches
- 2.0.x src/Plugin/DashboardLazyBuildBase.php \Drupal\dashboards\Plugin\DashboardLazyBuildBase::lazyBuildPreRender()
Helper for lazy build render.
Parameters
string $pluginId: Dashboard plugin id.
string $configuration: Serizalized configuration.
Return value
array Renderable array
Overrides DashboardLazyBuildInterface::lazyBuildPreRender
File
- src/
Plugin/ DashboardLazyBuildBase.php, line 15
Class
- DashboardLazyBuildBase
- Abstract class helper for lazy builds.
Namespace
Drupal\dashboards\PluginCode
public static function lazyBuildPreRender(string $pluginId, string $configuration) : array {
$configuration = Json::decode($configuration);
$plugin = \Drupal::service('plugin.manager.dashboard')
->createInstance($pluginId, $configuration);
return static::lazyBuild($plugin, $configuration);
}