You are here

interface GridStackEnginePluginInterface in GridStack 8.2

Provides an interface defining GridStack layout engines.

Hierarchy

Expanded class hierarchy of GridStackEnginePluginInterface

All classes that implement GridStackEnginePluginInterface

File

src/GridStackEnginePluginInterface.php, line 8

Namespace

Drupal\gridstack
View source
interface GridStackEnginePluginInterface extends GridStackPluginInterface {

  /**
   * Returns the layout engine classes for select options.
   *
   * @return array
   *   The array of the defined classes.
   */
  public function classOptions();

  /**
   * Alters GridStack build.
   *
   * @param array $build
   *   An associative array containing:
   *   - items: An array of gridstack contents: text, image or media.
   *   - options: An array of key:value pairs of custom JS options.
   *   - optionset: The cached optionset object to avoid multiple invocations.
   *   - settings: An array of key:value pairs of HTML/layout related settings.
   * @param array $element
   *   The render element being modified.
   */
  public function build(array &$build, array &$element);

  /**
   * Builds GridStack boxes to support nested grids for Bootstrap/ Foundation.
   *
   * The nested grids require extra tools like DS, Panelizer, or Widget, to
   * arrange them into their relevant container, e.g.: DS region, Widget block.
   *
   * @param array $build
   *   An associative array containing:
   *   - items: An array of gridstack contents: text, image or media.
   *   - options: An array of key:value pairs of custom JS options.
   *   - optionset: The cached optionset object to avoid multiple invocations.
   *   - settings: An array of key:value pairs of HTML/layout related settings.
   *
   * @return array
   *   The renderable array of a GridStack instance, or empty array.
   */
  public function buildItems(array $build);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
GridStackEnginePluginInterface::build public function Alters GridStack build. 1
GridStackEnginePluginInterface::buildItems public function Builds GridStack boxes to support nested grids for Bootstrap/ Foundation. 1
GridStackEnginePluginInterface::classOptions public function Returns the layout engine classes for select options. 1
GridStackPluginInterface::label public function Returns the plugin label. 1