protected function EntityShortcutSet::getEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/shortcut/src/Plugin/migrate/destination/EntityShortcutSet.php \Drupal\shortcut\Plugin\migrate\destination\EntityShortcutSet::getEntity()
Creates or loads an entity.
Parameters
\Drupal\migrate\Row $row: The row object.
array $old_destination_id_values: The old destination ids.
Return value
\Drupal\Core\Entity\EntityInterface The entity we're importing into.
Overrides Entity::getEntity
File
- core/
modules/ shortcut/ src/ Plugin/ migrate/ destination/ EntityShortcutSet.php, line 23 - Contains \Drupal\shortcut\Plugin\migrate\destination\EntityShortcutSet.
Class
- EntityShortcutSet
- Plugin annotation @MigrateDestination( id = "entity:shortcut_set" )
Namespace
Drupal\shortcut\Plugin\migrate\destinationCode
protected function getEntity(Row $row, array $old_destination_id_values) {
$entity = parent::getEntity($row, $old_destination_id_values);
// Set the "syncing" flag to TRUE, to avoid duplication of default
// shortcut links
$entity
->setSyncing(TRUE);
return $entity;
}