3 namespace Drupal\Core\Layout;
5 use Drupal\Component\Plugin\CategorizingPluginManagerInterface;
8 * Provides the interface for a plugin manager of layouts.
11 * The layout system is currently experimental and should only be leveraged by
12 * experimental modules and development releases of contributed modules.
13 * See https://www.drupal.org/core/experimental for more information.
15 interface LayoutPluginManagerInterface extends CategorizingPluginManagerInterface {
18 * Gets theme implementations for layouts.
21 * An associative array of the same format as returned by hook_theme().
25 public function getThemeImplementations();
30 * @return \Drupal\Core\Layout\LayoutInterface
32 public function createInstance($plugin_id, array $configuration = []);
37 * @return \Drupal\Core\Layout\LayoutDefinition|null
39 public function getDefinition($plugin_id, $exception_on_invalid = TRUE);
44 * @return \Drupal\Core\Layout\LayoutDefinition[]
46 public function getDefinitions();
51 * @return \Drupal\Core\Layout\LayoutDefinition[]
53 public function getSortedDefinitions(array $definitions = NULL);
58 * @return \Drupal\Core\Layout\LayoutDefinition[][]
60 public function getGroupedDefinitions(array $definitions = NULL);
63 * Returns an array of layout labels grouped by category.
66 * A nested array of labels suitable for #options.
68 public function getLayoutOptions();