You are here

interface LayoutInterface in Layout 8.2

Defines the shared interface for all layout plugins.

Hierarchy

Expanded class hierarchy of LayoutInterface

All classes that implement LayoutInterface

7 files declare their use of LayoutInterface
BoundDisplayInterface.php in lib/Drupal/layout/Config/BoundDisplayInterface.php
Definition of Drupal\layout\Config\BoundDisplayInterface
Display.php in lib/Drupal/layout/Entity/Display.php
Definition of Drupal\layout\Entity\Display.
DisplayBase.php in lib/Drupal/layout/Config/DisplayBase.php
Definition of Drupal\layout\Config\DisplayBase.
DisplayInterface.php in lib/Drupal/layout/Config/DisplayInterface.php
Definition of Drupal\layout\Config\DisplayInterface
StaticLayout.php in lib/Drupal/layout/Plugin/Layout/StaticLayout.php
Contains \Drupal\layout\Plugin\Layout\StaticLayout.

... See full list

File

lib/Drupal/layout/Plugin/LayoutInterface.php, line 15
Definition of Drupal\layout\Plugin\LayoutInterface.

Namespace

Drupal\layout\Plugin
View source
interface LayoutInterface extends PluginInspectionInterface {

  /**
   * Returns a list of regions.
   *
   * @return array
   *   An associative array of region information keyed by region machine
   *   names. Each region information element is a two item associative array
   *   with a 'label' and a 'type' key designating the human readable label
   *   and the type of the region.
   */
  public function getRegions();

  /**
   * Renders layout and returns the rendered markup.
   *
   * @param bool $admin
   *   (optional) TRUE if the rendered layout is displayed in an administrative
   *   context, FALSE otherwise. Defaults to FALSE.
   * @param array $regions
   *   (optional) An array of region render arrays keyed by region machine
   *   names. Defaults to array.
   *
   * @return string
   *   Rendered HTML output from the layout.
   */
  public function renderLayout($admin = FALSE, $regions = array());

}

Members

Namesort descending Modifiers Type Description Overrides
LayoutInterface::getRegions public function Returns a list of regions. 1
LayoutInterface::renderLayout public function Renders layout and returns the rendered markup. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2