You are here

protected function EntityReference::getLangcodeKey in Feeds 8.3

Returns the entity type's langcode key, if it has one.

Return value

string|null The langcode key of the entity type.

1 call to EntityReference::getLangcodeKey()
EntityReference::createEntity in src/Feeds/Target/EntityReference.php
Creates a new entity with the given label and saves it.

File

src/Feeds/Target/EntityReference.php, line 252

Class

EntityReference
Defines an entity reference mapper.

Namespace

Drupal\feeds\Feeds\Target

Code

protected function getLangcodeKey() {
  $entity_type = $this->entityTypeManager
    ->getDefinition($this
    ->getEntityType());
  if ($entity_type
    ->hasKey('langcode')) {
    return $entity_type
      ->getKey('langcode');
  }
}