function EntityRevision::getIds
Same name in other branches
- 9 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getIds()
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getIds()
- 10 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getIds()
Overrides EntityContentBase::getIds
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityRevision.php, line 181
Class
- EntityRevision
- Provides entity revision destination plugin.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function getIds() {
$ids = [];
$revision_key = $this->getKey('revision');
if (!$revision_key) {
throw new MigrateException(sprintf('The "%s" entity type does not support revisions.', $this->storage
->getEntityTypeId()));
}
$ids[$revision_key] = $this->getDefinitionFromEntity($revision_key);
if ($this->isTranslationDestination()) {
$langcode_key = $this->getKey('langcode');
if (!$langcode_key) {
throw new MigrateException(sprintf('The "%s" entity type does not support translations.', $this->storage
->getEntityTypeId()));
}
$ids[$langcode_key] = $this->getDefinitionFromEntity($langcode_key);
}
return $ids;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.