You are here

protected function Entity::getKey in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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()

10 calls to Entity::getKey()
Entity::getEntityId in core/modules/migrate/src/Plugin/migrate/destination/Entity.php
Get the entity id of the row.
EntityConfigBase::getIds in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Get the destination ids.
EntityConfigBase::import in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Import the row.
EntityContentBase::getIds in core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
Get the destination ids.
EntityContentBase::processStubRow in core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
Do as much population of the stub row as we can.

... See full list

File

core/modules/migrate/src/Plugin/migrate/destination/Entity.php, line 150
Contains \Drupal\migrate\Plugin\migrate\destination\Entity.

Class

Entity
Plugin annotation @MigrateDestination( id = "entity", deriver = "Drupal\migrate\Plugin\Derivative\MigrateEntity" )

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

protected function getKey($key) {
  return $this->storage
    ->getEntityType()
    ->getKey($key);
}