You are here

protected static function EntityFieldDefinitionTrait::getEntityTypeId in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/EntityFieldDefinitionTrait.php \Drupal\migrate\EntityFieldDefinitionTrait::getEntityTypeId()
  2. 9 core/modules/migrate/src/EntityFieldDefinitionTrait.php \Drupal\migrate\EntityFieldDefinitionTrait::getEntityTypeId()

Finds the entity type from configuration or plugin ID.

Parameters

string $plugin_id: The plugin ID.

Return value

string The entity type.

6 calls to EntityFieldDefinitionTrait::getEntityTypeId()
Entity::create in core/modules/migrate/src/Plugin/migrate/destination/Entity.php
Creates an instance of the plugin.
EntityComment::create in core/modules/comment/src/Plugin/migrate/destination/EntityComment.php
Creates an instance of the plugin.
EntityConfigBase::create in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Creates an instance of the plugin.
EntityContentBase::create in core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php
Creates an instance of the plugin.
EntitySearchPage::create in core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php
Creates an instance of the plugin.

... See full list

1 method overrides EntityFieldDefinitionTrait::getEntityTypeId()
Book::getEntityTypeId in core/modules/book/src/Plugin/migrate/destination/Book.php
Finds the entity type from configuration or plugin ID.

File

core/modules/migrate/src/EntityFieldDefinitionTrait.php, line 48

Class

EntityFieldDefinitionTrait
The entity field definition trait.

Namespace

Drupal\migrate

Code

protected static function getEntityTypeId($plugin_id) {
  $entity_type_id = NULL;
  if (strpos($plugin_id, static::DERIVATIVE_SEPARATOR)) {
    [
      ,
      $entity_type_id,
    ] = explode(static::DERIVATIVE_SEPARATOR, $plugin_id, 2);
  }
  return $entity_type_id;
}