You are here

interface StylePluginManagerInterface in Styles API 8

Provides an interface for the discovery and instantiation of layout plugins.

Hierarchy

Expanded class hierarchy of StylePluginManagerInterface

All classes that implement StylePluginManagerInterface

File

src/Plugin/Style/StylePluginManagerInterface.php, line 14
Contains \Drupal\style_api\Plugin\Style\StylePluginManagerInterface.

Namespace

Drupal\styles_api\Plugin\Style
View source
interface StylePluginManagerInterface extends PluginManagerInterface {

  /**
   * Get all available styles as an options array.
   *
   * If group_by_category option/parameter passed group the options by
   * category.
   *
   * @param array $params
   *   (optional) An associative array with the following keys:
   *   - group_by_category: (bool) If set to TRUE, return an array of arrays
   *   grouped by the category name; otherwise, return a single-level
   *   associative array.
   *
   * @return array
   *   Style options, as array.
   */
  public function getStyleOptions(array $params = []);

  /**
   * Get theme implementations.
   *
   * @return array
   *   An associative array of the same format as returned by hook_theme().
   *
   * @see hook_theme()
   */
  public function getThemeImplementations();

}

Members

Namesort descending Modifiers Type Description Overrides
DiscoveryInterface::getDefinition public function Gets a specific plugin definition. 4
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type. 3
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists. 2
FactoryInterface::createInstance public function Creates a pre-configured instance of a plugin. 7
MapperInterface::getInstance public function Gets a preconfigured instance of a plugin. 4
StylePluginManagerInterface::getStyleOptions public function Get all available styles as an options array. 1
StylePluginManagerInterface::getThemeImplementations public function Get theme implementations. 1