You are here

class PluginNotFoundException in Drupal 8

Same name and namespace in other branches
  1. 9 core/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

45 files declare their use of PluginNotFoundException
ContentModerationConfigureEntityTypesForm.php in core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php
ContentModerationStateResourceTest.php in core/modules/content_moderation/tests/src/Kernel/ContentModerationStateResourceTest.php
DefaultLazyPluginCollection.php in core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php
DefaultLazyPluginCollectionTest.php in core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php
DefaultPluginManagerTest.php in core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php

... See full list

File

core/lib/Drupal/Component/Plugin/Exception/PluginNotFoundException.php, line 8

Namespace

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

  /**
   * Construct an PluginNotFoundException exception.
   *
   * For the remaining parameters see \Exception.
   *
   * @param string $plugin_id
   *   The plugin ID that was not found.
   *
   * @see \Exception
   */
  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.