class BadPluginDefinitionException

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException
  2. 8.9.x core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException
  3. 10 core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException

Defines a class for bad plugin definition exceptions.

Hierarchy

Expanded class hierarchy of BadPluginDefinitionException

4 files declare their use of BadPluginDefinitionException
CredentialForm.php in core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
MigrateFieldPluginManager.php in core/modules/migrate_drupal/src/Plugin/MigrateFieldPluginManager.php
MigrationPluginManager.php in core/modules/migrate_drupal/src/MigrationPluginManager.php
MigrationProvidersExistTest.php in core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php

File

core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php, line 10

Namespace

Drupal\migrate\Plugin\Exception
View source
class BadPluginDefinitionException extends InvalidPluginDefinitionException {
    
    /**
     * Constructs a BadPluginDefinitionException.
     *
     * @param string $plugin_id
     *   The plugin ID of the mapper.
     * @param string $property
     *   The name of the property that is missing from the plugin.
     * @param int $code
     *   (optional) The exception code. Defaults to 0.
     * @param \Exception|null $previous
     *   The previous throwable used for exception chaining.
     *
     * @see \Exception
     */
    public function __construct($plugin_id, $property, $code = 0, ?\Exception $previous = NULL) {
        $message = sprintf('The %s plugin must define the %s property.', $plugin_id, $property);
        parent::__construct($plugin_id, $message, $code, $previous);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
BadPluginDefinitionException::__construct public function Constructs a BadPluginDefinitionException. Overrides InvalidPluginDefinitionException::__construct
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.

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