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

Breadcrumb

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

class InvalidPluginDefinitionException

Defines a class for invalid plugin definition exceptions.

Hierarchy

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

Expanded class hierarchy of InvalidPluginDefinitionException

14 files declare their use of InvalidPluginDefinitionException
ActionMethod.php in core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php
BadPluginDefinitionException.php in core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php
CKEditor5Plugin.php in core/modules/ckeditor5/src/Attribute/CKEditor5Plugin.php
CKEditor5PluginDefinition.php in core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php
CKEditor5PluginManager.php in core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php

... See full list

File

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

Namespace

Drupal\Component\Plugin\Exception
View source
class InvalidPluginDefinitionException extends PluginException {
    
    /**
     * The plugin ID of the mapper.
     *
     * @var string
     */
    protected $pluginId;
    
    /**
     * Constructs an InvalidPluginDefinitionException.
     *
     * @param string $plugin_id
     *   The plugin ID of the mapper.
     * @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) {
        $this->pluginId = $plugin_id;
        parent::__construct($message, $code, $previous);
    }
    
    /**
     * Gets the plugin ID of the mapper that raised the exception.
     *
     * @return string
     *   The plugin ID.
     */
    public function getPluginId() {
        return $this->pluginId;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overrides
InvalidPluginDefinitionException::$pluginId protected property The plugin ID of the mapper.
InvalidPluginDefinitionException::getPluginId public function Gets the plugin ID of the mapper that raised the exception.
InvalidPluginDefinitionException::__construct public function Constructs an InvalidPluginDefinitionException. 1

API Navigation

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