Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PluginNotFoundException.php

class PluginNotFoundException

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

Hierarchy

  • class \Drupal\Component\Plugin\Exception\PluginException extends \Drupal\Component\Plugin\Exception\Exception implements \Drupal\Component\Plugin\Exception\ExceptionInterface
    • class \Drupal\Component\Plugin\Exception\PluginNotFoundException extends \Drupal\Component\Plugin\Exception\PluginException

Expanded class hierarchy of PluginNotFoundException

27 files declare their use of PluginNotFoundException
Action.php in core/modules/system/src/Entity/Action.php
ConfigActionManager.php in core/lib/Drupal/Core/Config/Action/ConfigActionManager.php
ContentModerationConfigureEntityTypesForm.php in core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php
DefaultLazyPluginCollection.php in core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php
DiscoveryTrait.php in core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.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 a PluginNotFoundException exception.
     *
     * @param string $plugin_id
     *   The plugin ID that was not found.
     * @param string $message
     *   The exception message.
     * @param int $code
     *   The exception code.
     * @param \Exception|null $previous
     *   The previous throwable used for exception chaining.
     *
     * @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

Title Sort descending Modifiers Object type Summary
PluginNotFoundException::__construct public function Construct a PluginNotFoundException exception.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal