- public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
- if (is_callable($this->configuration['callable'])) {
- $value = call_user_func($this->configuration['callable'], $value);
+ 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.');