Callback.php in Zircon Profile 8.0
File
core/modules/migrate/src/Plugin/migrate/process/Callback.php
View source
<?php
namespace Drupal\migrate\Plugin\migrate\process;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class Callback extends ProcessPluginBase {
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);
}
return $value;
}
}
Classes
Name |
Description |
Callback |
This plugin allows source value to be passed to a callback. |