You are here

class BadPluginDefinitionException in Drupal 8

Same name and namespace in other branches
  1. 9 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.
   *
   * For the remaining parameters see \Exception.
   *
   * @param string $plugin_id
   *   The plugin ID of the mapper.
   * @param string $property
   *   The name of the property that is missing from the plugin.
   *
   * @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

Namesort descending Modifiers Type Description Overrides
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.