You are here

interface PanelsDisplayManagerInterface in Panels 8.3

Same name and namespace in other branches
  1. 8.4 src/PanelsDisplayManagerInterface.php \Drupal\panels\PanelsDisplayManagerInterface

Interface for a service that manages Panels displays.

Hierarchy

Expanded class hierarchy of PanelsDisplayManagerInterface

All classes that implement PanelsDisplayManagerInterface

File

src/PanelsDisplayManagerInterface.php, line 14

Namespace

Drupal\panels
View source
interface PanelsDisplayManagerInterface {

  /**
   * Create a new panels display.
   *
   * @param string|\Drupal\layout_plugin\Plugin\Layout\LayoutInterface|NULL $layout
   *   The layout plugin object or plugin id. If omitted, the default Panels
   *   layout will be used.
   * @param string|\Drupal\panels\Plugin\DisplayBuilder\DisplayBuilderInterface|NULL $builder
   *   The builder object or plugin id. If omitted, the default Panels builder
   *   will be used.
   *
   * @return \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant
   *
   * @throws \Exception
   *   If $layout or $builder are of an invalid type.
   */
  public function createDisplay($layout = NULL, $builder = NULL);

  /**
   * Creates a panels display from exported configuration.
   *
   * @param array $config
   *   The configuration exported from display variant.
   * @param bool $validate
   *   Whether or not to validate against the configuration again the schema.
   *
   * @return \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant
   */
  public function importDisplay(array $config, $validate = TRUE);

  /**
   * Export configuration from a panels display.
   *
   * @param \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $display
   *   The panels display.
   *
   * @return array
   *   Configuration exported from the display.
   */
  public function exportDisplay(PanelsDisplayVariant $display);

}

Members

Namesort descending Modifiers Type Description Overrides
PanelsDisplayManagerInterface::createDisplay public function Create a new panels display. 1
PanelsDisplayManagerInterface::exportDisplay public function Export configuration from a panels display. 1
PanelsDisplayManagerInterface::importDisplay public function Creates a panels display from exported configuration. 1