1. 8.3.x core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php DiscoveryInterface
  2. 8.0.x core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php DiscoveryInterface
  3. 8.1.x core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php DiscoveryInterface
  4. 8.2.x core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php DiscoveryInterface
  5. 8.4.x core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php DiscoveryInterface

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


Expanded class hierarchy of DiscoveryInterface

All classes that implement DiscoveryInterface

Related topics

13 files declare their use of DiscoveryInterface
AnnotatedClassDiscovery.php in core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
ConfigSchemaDiscovery.php in core/lib/Drupal/Core/Config/Schema/ConfigSchemaDiscovery.php
DefaultFactory.php in core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
EntityTypeManagerTest.php in core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php
Contains \Drupal\Tests\Core\Entity\EntityTypeManagerTest.
HookDiscovery.php in core/lib/Drupal/Core/Plugin/Discovery/HookDiscovery.php

... See full list


core/lib/Drupal/Component/Plugin/Discovery/DiscoveryInterface.php, line 11


View source
interface DiscoveryInterface {

   * Gets a specific plugin definition.
   * @param string $plugin_id
   *   A plugin id.
   * @param bool $exception_on_invalid
   *   (optional) If TRUE, an invalid plugin ID will throw an exception.
   * @return mixed
   *   A plugin definition, or NULL if the plugin ID is invalid and
   *   $exception_on_invalid is FALSE.
   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
   *   Thrown if $plugin_id is invalid and $exception_on_invalid is TRUE.
  public function getDefinition($plugin_id, $exception_on_invalid = TRUE);

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

   * Indicates if a specific plugin definition exists.
   * @param string $plugin_id
   *   A plugin ID.
   * @return bool
   *   TRUE if the definition exists, FALSE otherwise.
  public function hasDefinition($plugin_id);



Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
DiscoveryInterface::getDefinition public function Gets a specific plugin definition. Overrides DiscoveryInterface::getDefinition 5
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryInterface::getDefinitions 3
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists. Overrides DiscoveryInterface::hasDefinition 3