Drupal 8  8.0.2
DiscoveryInterface Interface Reference
Inheritance diagram for DiscoveryInterface:

Public Member Functions

 getDefinition ($plugin_id, $exception_on_invalid=TRUE)
 getDefinitions ()
 hasDefinition ($plugin_id)

Detailed Description

An interface defining the minimum requirements of building a plugin discovery component.

Member Function Documentation

getDefinition (   $plugin_id,
  $exception_on_invalid = TRUE 

Gets a specific plugin definition.

string$plugin_idA plugin id.
bool$exception_on_invalid(optional) If TRUE, an invalid plugin ID will throw an exception.
mixed A plugin definition, or NULL if the plugin ID is invalid and $exception_on_invalid is FALSE.
\Drupal\Component\Plugin\Exception\PluginNotFoundExceptionThrown if $plugin_id is invalid and $exception_on_invalid is TRUE.

Implemented in MenuLinkManager, EntityTypeManagerInterface, EntityTypeManager, TypedConfigManager, PluginManagerBase, DerivativeDiscoveryDecorator, EntityManager, and StaticDiscoveryDecorator.

getDefinitions ( )

Gets the definition of all plugins for this type.

mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.

Implemented in EntityManager, LocalTaskManager, MenuLinkManager, DefaultPluginManager, EntityTypeManagerInterface, CategorizingPluginManager, DerivativeDiscoveryDecorator, YamlDiscovery, PluginManagerBase, StaticDiscoveryDecorator, HookDiscovery, InfoHookDecorator, YamlDiscoveryDecorator, ConfigSchemaDiscovery, and StaticDiscovery.

Referenced by FieldStorageConfigListBuilder\__construct(), and EntityDisplayFormBase\__construct().

Here is the caller graph for this function:

hasDefinition (   $plugin_id)

Indicates if a specific plugin definition exists.

string$plugin_idA plugin ID.
bool TRUE if the definition exists, FALSE otherwise.

Implemented in EntityManager, and MenuLinkManager.

The documentation for this interface was generated from the following file: