Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Layout / LayoutPluginManagerInterface.php
1 <?php
2
3 namespace Drupal\Core\Layout;
4
5 use Drupal\Component\Plugin\CategorizingPluginManagerInterface;
6
7 /**
8  * Provides the interface for a plugin manager of layouts.
9  *
10  * @internal
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.
14  */
15 interface LayoutPluginManagerInterface extends CategorizingPluginManagerInterface {
16
17   /**
18    * Gets theme implementations for layouts.
19    *
20    * @return array
21    *   An associative array of the same format as returned by hook_theme().
22    *
23    * @see hook_theme()
24    */
25   public function getThemeImplementations();
26
27   /**
28    * {@inheritdoc}
29    *
30    * @return \Drupal\Core\Layout\LayoutInterface
31    */
32   public function createInstance($plugin_id, array $configuration = []);
33
34   /**
35    * {@inheritdoc}
36    *
37    * @return \Drupal\Core\Layout\LayoutDefinition|null
38    */
39   public function getDefinition($plugin_id, $exception_on_invalid = TRUE);
40
41   /**
42    * {@inheritdoc}
43    *
44    * @return \Drupal\Core\Layout\LayoutDefinition[]
45    */
46   public function getDefinitions();
47
48   /**
49    * {@inheritdoc}
50    *
51    * @return \Drupal\Core\Layout\LayoutDefinition[]
52    */
53   public function getSortedDefinitions(array $definitions = NULL);
54
55   /**
56    * {@inheritdoc}
57    *
58    * @return \Drupal\Core\Layout\LayoutDefinition[][]
59    */
60   public function getGroupedDefinitions(array $definitions = NULL);
61
62   /**
63    * Returns an array of layout labels grouped by category.
64    *
65    * @return string[][]
66    *   A nested array of labels suitable for #options.
67    */
68   public function getLayoutOptions();
69
70 }