You are here

DashboardLazyBuildInterface.php in Dashboards with Layout Builder 8

Same filename and directory in other branches
  1. 2.0.x src/Plugin/DashboardLazyBuildInterface.php

File

src/Plugin/DashboardLazyBuildInterface.php
View source
<?php

namespace Drupal\dashboards\Plugin;


/**
 * Interface for lazy builds.
 */
interface DashboardLazyBuildInterface {

  /**
   * Callback for lazy build.
   *
   * @param \Drupal\dashboards\Plugin\DashboardBase $plugin
   *   Plugin.
   * @param array $configuration
   *   Configuration.
   *
   * @return array
   *   Return renderable array.
   */
  public static function lazyBuild(DashboardBase $plugin, array $configuration) : array;

  /**
   * Helper for lazy build render.
   *
   * @param string $pluginId
   *   Dashboard plugin id.
   * @param string $configuration
   *   Serizalized configuration.
   *
   * @return array
   *   Renderable array
   */
  public static function lazyBuildPreRender(string $pluginId, string $configuration) : array;

}

Interfaces

Namesort descending Description
DashboardLazyBuildInterface Interface for lazy builds.