3 namespace Drupal\layout_plugin\Plugin\Layout;
5 use Drupal\Component\Plugin\CategorizingPluginManagerInterface;
8 * Provides an interface for the discovery and instantiation of layout plugins.
10 interface LayoutPluginManagerInterface extends CategorizingPluginManagerInterface {
13 * Get all available layouts as an options array.
15 * If group_by_category option/parameter passed group the options by
18 * @param array $params
19 * (optional) An associative array with the following keys:
20 * - group_by_category: (bool) If set to TRUE, return an array of arrays
21 * grouped by the category name; otherwise, return a single-level
25 * Layout options, as array.
27 public function getLayoutOptions(array $params = []);
30 * Get theme implementations for layouts that give only a template.
33 * An associative array of the same format as returned by hook_theme().
37 public function getThemeImplementations();
40 * Modifies the theme implementations for the layouts that we registered.
42 * @param array &$theme_registry
43 * An associative array of the same format as passed to hook_theme_registry_alter().
45 * @see hook_theme_registry_alter()
47 public function alterThemeImplementations(array &$theme_registry);
50 * Get library info for layouts that want to automatically register CSS.
53 * An associative array of the same format as returned by
54 * hook_library_info_build().
56 * @see hook_library_info_build()
58 * @deprecated when moving layout plugin to core
60 public function getLibraryInfo();