function Entity::getKey
Same name and namespace in other branches
- 11.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::getKey()
- 10 core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::getKey()
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::getKey()
Returns a specific entity key.
Parameters
string $key: The name of the entity key to return.
Return value
string|bool The entity key, or FALSE if it does not exist.
See also
\Drupal\Core\Entity\EntityTypeInterface::getKeys()
6 calls to Entity::getKey()
- EntityContentBase::getIds in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php - Gets the destination IDs.
- EntityContentBase::processStubRow in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php - Populates as much of the stub row as possible.
- EntityContentBase::rollback in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php - Delete the specified destination object from the target Drupal.
- EntityContentComplete::getEntity in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php - Gets the entity.
- EntityContentComplete::getIds in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php - Gets the destination IDs.
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ Entity.php, line 206
Class
- Entity
- Provides a generic destination to import entities.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
protected function getKey($key) {
return $this->storage
->getEntityType()
->getKey($key);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.