W3cubDocs

/Drupal 8

class EntityType

Defines an Entity type annotation object.

Entity type plugins use an object-based annotation method, rather than an array-type annotation method (as commonly used on other annotation types). The annotation properties of entity types are found on \Drupal\Core\Entity\EntityType and are accessed using get/set methods defined in \Drupal\Core\Entity\EntityTypeInterface.

Hierarchy

Related topics

Annotations
Annotations for class discovery and metadata description.
Entity API
Describes how to define and manipulate content and configuration entities.

File

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

Namespace

Drupal\Core\Entity\Annotation

Members

Name Modifiers Type Description
EntityType::$entity_type_class public property The class used to represent the entity type.
EntityType::$group public property The group machine name.
EntityType::$group_label public property The group label.
EntityType::get public function Gets the value of an annotation. Overrides Plugin::get
Plugin::$definition protected property The plugin definition read from the class annotation.
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object.
StringTranslationTrait::$stringTranslation protected property The string translation service.
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use.
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Annotation!EntityType.php/class/EntityType/8.1.x