Same name in this branch
  1. 10 core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::get()
  2. 10 core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()
Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()
  2. 9 core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()

Gets the value of an annotation.

Overrides Plugin::get

2 calls to EntityType::get()
ConfigEntityType::get in core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php
Gets the value of an annotation.
ContentEntityType::get in core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php
Gets the value of an annotation.
2 methods override EntityType::get()
ConfigEntityType::get in core/lib/Drupal/Core/Entity/Annotation/ConfigEntityType.php
Gets the value of an annotation.
ContentEntityType::get in core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php
Gets the value of an annotation.

File

core/lib/Drupal/Core/Entity/Annotation/EntityType.php, line 53

Class

EntityType
Defines an Entity type annotation object.

Namespace

Drupal\Core\Entity\Annotation

Code

public function get() {
  $values = $this->definition;

  // Use the specified entity type class, and remove it before instantiating.
  $class = $values['entity_type_class'];
  unset($values['entity_type_class']);
  return new $class($values);
}