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

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
2016-10-29 09:07:56
Comments
Leave a Comment

Please login to continue.