You are here

public function PanelsDisplayManager::importDisplay in Panels 8.3

Same name and namespace in other branches
  1. 8.4 src/PanelsDisplayManager.php \Drupal\panels\PanelsDisplayManager::importDisplay()

Creates a panels display from exported configuration.

Parameters

array $config: The configuration exported from display variant.

bool $validate: Whether or not to validate against the configuration again the schema.

Return value

\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant

Overrides PanelsDisplayManagerInterface::importDisplay

File

src/PanelsDisplayManager.php, line 85

Class

PanelsDisplayManager
A service that manages Panels displays.

Namespace

Drupal\panels

Code

public function importDisplay(array $config, $validate = TRUE) {

  // Validate against the schema if requested.
  if ($validate) {
    $this
      ->validate($config);
  }
  return $this->variantManager
    ->createInstance('panels_variant', $config);
}