You are here

protected function ExtraFieldTypePluginBase::getTargetEntityTypeId in Entity Extra Field 2.0.x

Same name and namespace in other branches
  1. 8 src/ExtraFieldTypePluginBase.php \Drupal\entity_extra_field\ExtraFieldTypePluginBase::getTargetEntityTypeId()

Get target entity type identifier.

Return value

string|null A target entity type identifier; otherwise NULL.

2 calls to ExtraFieldTypePluginBase::getTargetEntityTypeId()
ExtraFieldTypePluginBase::getTargetEntityTypeBundle in src/ExtraFieldTypePluginBase.php
Get target entity type bundle.
ExtraFieldTypePluginBase::getTargetEntityTypeDefinition in src/ExtraFieldTypePluginBase.php
Get target entity type definition.

File

src/ExtraFieldTypePluginBase.php, line 217

Class

ExtraFieldTypePluginBase
Define extra field type plugin base.

Namespace

Drupal\entity_extra_field

Code

protected function getTargetEntityTypeId() : ?string {
  return $this->currentRouteMatch
    ->getParameter('entity_type_id') ?: NULL;
}