protected function EntityShortcutSet::getEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/shortcut/src/Plugin/migrate/destination/EntityShortcutSet.php \Drupal\shortcut\Plugin\migrate\destination\EntityShortcutSet::getEntity()
- 9 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 are importing into.
Overrides Entity::getEntity
File
- core/
modules/ shortcut/ src/ Plugin/ migrate/ destination/ EntityShortcutSet.php, line 18
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;
}