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

Breadcrumb

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

class BadPluginDefinitionException

Defines a class for bad 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
      • class \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException extends \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

Expanded class hierarchy of BadPluginDefinitionException

3 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

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.
RSS feed
Powered by Drupal