Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Entity.php

function 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()

14 calls to Entity::getKey()
Entity::getBundle in core/modules/migrate/src/Plugin/migrate/destination/Entity.php
Gets the bundle for the row taking into account the default.
Entity::getEntity in core/modules/migrate/src/Plugin/migrate/destination/Entity.php
Creates or loads an entity.
Entity::getEntityId in core/modules/migrate/src/Plugin/migrate/destination/Entity.php
Gets the entity ID of the row.
EntityConfigBase::getIds in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Gets the destination IDs.
EntityConfigBase::import in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Import the row.

... See full list

File

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

Class

Entity
Provides a generic destination to import entities.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal