function Callback::__construct
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php \PHPUnit\Framework\Constraint\Callback::__construct()
- 11.1.x vendor/symfony/validator/Constraints/Callback.php \Symfony\Component\Validator\Constraints\Callback::__construct()
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ process/ Callback.php, line 83
Class
- Callback
- Passes the source value to a callback.
Namespace
Drupal\migrate\Plugin\migrate\processCode
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
if (!isset($configuration['callable'])) {
throw new \InvalidArgumentException('The "callable" must be set.');
}
elseif (!is_callable($configuration['callable'])) {
throw new \InvalidArgumentException('The "callable" must be a valid function or method.');
}
parent::__construct($configuration, $plugin_id, $plugin_definition);
}