protected function ExtraFieldTypePluginBase::getTargetEntityTypeBundle in Entity Extra Field 2.0.x
Same name and namespace in other branches
- 8 src/ExtraFieldTypePluginBase.php \Drupal\entity_extra_field\ExtraFieldTypePluginBase::getTargetEntityTypeBundle()
Get target entity type bundle.
Return value
\Drupal\Core\Entity\EntityInterface The target entity type bundle object.
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
ExtraFieldTypePluginBase.php, line 229
Class
- ExtraFieldTypePluginBase
- Define extra field type plugin base.
Namespace
Drupal\entity_extra_fieldCode
protected function getTargetEntityTypeBundle() : EntityInterface {
$entity_type_id = $this
->getTargetEntityTypeId();
$bundle_entity_type = $bundle_entity_type = $this->entityTypeManager
->getDefinition($entity_type_id)
->getBundleEntityType();
return $this->currentRouteMatch
->getParameter($bundle_entity_type);
}