You are here

protected function EntityReferenceHierarchy::entityTypeDefinition in Entity Reference Hierarchy 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/Field/FieldType/EntityReferenceHierarchy.php \Drupal\entity_hierarchy\Plugin\Field\FieldType\EntityReferenceHierarchy::entityTypeDefinition()

Gets the entity type definition.

Return value

\Drupal\Core\Entity\EntityTypeInterface Entity type.

1 call to EntityReferenceHierarchy::entityTypeDefinition()
EntityReferenceHierarchy::loadSiblingEntityWeights in src/Plugin/Field/FieldType/EntityReferenceHierarchy.php
Loads other children of the given parent.

File

src/Plugin/Field/FieldType/EntityReferenceHierarchy.php, line 220

Class

EntityReferenceHierarchy
Plugin implementation of the 'entity_reference_hierarchy' field type.

Namespace

Drupal\entity_hierarchy\Plugin\Field\FieldType

Code

protected function entityTypeDefinition() {
  return \Drupal::entityTypeManager()
    ->getDefinition($this
    ->getFieldDefinition()
    ->getTargetEntityTypeId());
}