class InvalidPluginDefinitionException

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Exception/InvalidPluginDefinitionException.php \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
  2. 10 core/lib/Drupal/Component/Plugin/Exception/InvalidPluginDefinitionException.php \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
  3. 11.x core/lib/Drupal/Component/Plugin/Exception/InvalidPluginDefinitionException.php \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

Defines a class for invalid plugin definition exceptions.

Hierarchy

Expanded class hierarchy of InvalidPluginDefinitionException

15 files declare their use of InvalidPluginDefinitionException
BadPluginDefinitionException.php in core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php
ConfigMapperManager.php in core/modules/config_translation/src/ConfigMapperManager.php
ContentEntity.php in core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php
ContentEntityTest.php in core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php
EntityRevisionParamConverterTest.php in core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.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 a InvalidPluginDefinitionException.
     *
     * For the remaining parameters see \Exception.
     *
     * @param string $plugin_id
     *   The plugin ID of the mapper.
     *
     * @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 a InvalidPluginDefinitionException. 1

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.