public function Config::import in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Plugin/migrate/destination/Config.php \Drupal\migrate\Plugin\migrate\destination\Config::import()
Import the row.
Derived classes must implement import(), to construct one new object (pre-populated) using ID mappings in the Migration.
Parameters
\Drupal\migrate\Row $row: The row object.
array $old_destination_id_values: The old destination ids.
Return value
mixed The entity id or an indication of success.
Overrides MigrateDestinationInterface::import
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ Config.php, line 75 - Contains \Drupal\migrate\Plugin\migrate\destination\Config.
Class
- Config
- Persist data to the config system.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function import(Row $row, array $old_destination_id_values = array()) {
foreach ($row
->getRawDestination() as $key => $value) {
if (isset($value) || !empty($this->configuration['store null'])) {
$this->config
->set(str_replace(Row::PROPERTY_SEPARATOR, '.', $key), $value);
}
}
$this->config
->save();
return [
$this->config
->getName(),
];
}