You are here

class PluginNotFoundException in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Plugin/Exception/PluginNotFoundException.php \Drupal\Component\Plugin\Exception\PluginNotFoundException

Plugin exception class to be thrown when a plugin ID could not be found.

Hierarchy

Expanded class hierarchy of PluginNotFoundException

6 files declare their use of PluginNotFoundException
AnnotatedClassDiscovery.php in modules/providers/service_container_annotation_discovery/src/Plugin/Discovery/AnnotatedClassDiscovery.php
Contains \Drupal\service_container_annotation_discovery\Plugin\Discovery\AnnotatedClassDiscovery
CToolsPluginDiscovery.php in src/Plugin/Discovery/CToolsPluginDiscovery.php
Contains \Drupal\service_container\Plugin\Discovery\CToolsPluginDiscovery
DefaultPluginManagerTest.php in tests/src/Plugin/DefaultPluginManagerTest.php
Contains \Drupal\Tests\service_container\Plugin\DefaultPluginManagerTest
DiscoveryTrait.php in lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php
Contains \Drupal\Component\Plugin\Discovery\DiscoveryTrait.
PluginManagerBase.php in src/Plugin/PluginManagerBase.php
Contains \Drupal\service_container\Plugin\PluginManagerBase

... See full list

File

lib/Drupal/Component/Plugin/Exception/PluginNotFoundException.php, line 13
Contains \Drupal\Component\Plugin\Exception\PluginNotFoundException.

Namespace

Drupal\Component\Plugin\Exception
View source
class PluginNotFoundException extends PluginException {

  /**
   * Construct an PluginNotFoundException exception.
   *
   * @param string $plugin_id
   *   The plugin ID that was not found.
   *
   * @see \Exception for remaining parameters.
   */
  public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) {
    if (empty($message)) {
      $message = sprintf("Plugin ID '%s' was not found.", $plugin_id);
    }
    parent::__construct($message, $code, $previous);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginNotFoundException::__construct public function Construct an PluginNotFoundException exception.