public function UrlAlias::import in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/path/src/Plugin/migrate/destination/UrlAlias.php \Drupal\path\Plugin\migrate\destination\UrlAlias::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/ path/ src/ Plugin/ migrate/ destination/ UrlAlias.php, line 66 - Contains \Drupal\path\Plugin\migrate\destination\UrlAlias.
Class
- UrlAlias
- Plugin annotation @MigrateDestination( id = "url_alias" )
Namespace
Drupal\path\Plugin\migrate\destinationCode
public function import(Row $row, array $old_destination_id_values = array()) {
$path = $this->aliasStorage
->save($row
->getDestinationProperty('source'), $row
->getDestinationProperty('alias'), $row
->getDestinationProperty('langcode'), $old_destination_id_values ? $old_destination_id_values[0] : NULL);
return array(
$path['pid'],
);
}