EntityType::get

public EntityType::get()

Gets the value of an annotation.

Overrides Plugin::get

File

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

Class

EntityType
Defines an Entity type annotation object.

Namespace

Drupal\Core\Entity\Annotation

Code

1
2
3
4
5
6
7
8
9
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);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.