DefaultValue.php in Zircon Profile 8.0
File
core/modules/migrate/src/Plugin/migrate/process/DefaultValue.php
View source
<?php
namespace Drupal\migrate\Plugin\migrate\process;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
class DefaultValue extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (!empty($this->configuration['strict'])) {
return isset($value) ? $value : $this->configuration['default_value'];
}
return $value ?: $this->configuration['default_value'];
}
}
Classes
Name |
Description |
DefaultValue |
This plugin sets missing values on the destination. |