interface DiscoveryInterface

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

Hierarchy

Expanded class hierarchy of DiscoveryInterface

All classes that implement DiscoveryInterface

16 files declare their use of DiscoveryInterface
AlterDecorator.php in drupal/core/lib/Drupal/Core/Plugin/Discovery/AlterDecorator.php
Definition of Drupal\Core\Plugin\Discovery\AlterDiscoveryDecorator.
AnnotatedClassDiscovery.php in drupal/core/lib/Drupal/Component/Plugin/Discovery/AnnotatedClassDiscovery.php
Contains Drupal\Component\Plugin\Discovery\AnnotatedClassDiscovery.
CacheDecorator.php in drupal/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php
Definition of Drupal\Core\Plugin\Discovery\CacheDecorator.
ContextAwarePluginBase.php in drupal/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Contains \Drupal\Component\Plugin\ContextAwarePluginBase
ContextAwarePluginBase.php in drupal/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
Contains \Drupal\Core\Plugin\ContextAwarePluginBase

... See full list

File

drupal/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php, line 14
Definition of Drupal\Component\Plugin\Discovery\DiscoveryInterface.

Namespace

Drupal\Component\Plugin\Discovery
View source
interface DiscoveryInterface {

  /**
   * Gets a specific plugin definition.
   *
   * @param string $plugin_id
   *   A plugin id.
   *
   * @return array|null
   *   A plugin definition, or NULL if no definition was found for $plugin_id.
   */
  public function getDefinition($plugin_id);

  /**
   * Gets the definition of all plugins for this type.
   *
   * @return array
   *   An array of plugin definitions (empty array if no definitions were
   *   found).
   */
  public function getDefinitions();

}

Members

Namesort descending Modifiers Type Description Overrides
DiscoveryInterface::getDefinition public function Gets a specific plugin definition. 10
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type. 10