function Entity::getEntityId

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::getEntityId()
  2. 10 core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::getEntityId()
  3. 11.x core/modules/migrate/src/Plugin/migrate/destination/Entity.php \Drupal\migrate\Plugin\migrate\destination\Entity::getEntityId()

Gets the entity ID of the row.

Parameters

\Drupal\migrate\Row $row: The row of data.

Return value

string The entity ID for the row that we are importing.

1 call to Entity::getEntityId()
Entity::getEntity in core/modules/migrate/src/Plugin/migrate/destination/Entity.php
Creates or loads an entity.
2 methods override Entity::getEntityId()
EntityBaseFieldOverride::getEntityId in core/modules/migrate/src/Plugin/migrate/destination/EntityBaseFieldOverride.php
Gets the entity ID of the row.
EntityBlock::getEntityId in core/modules/block/src/Plugin/migrate/destination/EntityBlock.php
Gets the entity ID of the row.

File

core/modules/migrate/src/Plugin/migrate/destination/Entity.php, line 186

Class

Entity
Provides a generic destination to import entities.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

protected function getEntityId(Row $row) {
    return $row->getDestinationProperty($this->getKey('id'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.