function BadPluginDefinitionException::__construct

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException::__construct()
  2. 10 core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException::__construct()
  3. 11.x core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php \Drupal\migrate\Plugin\Exception\BadPluginDefinitionException::__construct()

Constructs a BadPluginDefinitionException.

For the remaining parameters see \Exception.

Parameters

string $plugin_id: The plugin ID of the mapper.

string $property: The name of the property that is missing from the plugin.

Overrides InvalidPluginDefinitionException::__construct

See also

\Exception

File

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

Class

BadPluginDefinitionException
Defines a class for bad plugin definition exceptions.

Namespace

Drupal\migrate\Plugin\Exception

Code

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);
}

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