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

Defines a content entity type annotation object.

Content 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 content entity types are found on \Drupal\Core\Entity\ContentEntityType and are accessed using get/set methods defined in \Drupal\Core\Entity\ContentEntityTypeInterface.

Hierarchy

Expanded class hierarchy of ContentEntityType

Related topics

58 classes are annotated with ContentEntityType
Comment in core/modules/comment/src/Entity/Comment.php
Defines the comment entity class.
CommentTestBaseField in core/modules/comment/tests/modules/comment_base_field_test/src/Entity/CommentTestBaseField.php
Defines a test entity class for comment as a base field.
EntitySerializedField in core/modules/system/tests/modules/entity_test/src/Entity/EntitySerializedField.php
Defines a test class for testing fields with a serialized column.
EntityTestAddPage in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAddPage.php
Test entity class routes.
EntityTestAdminRoutes in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php
Defines a test entity type with administrative routes.

... See full list

File

core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php, line 20

Namespace

Drupal\Core\Entity\Annotation
View source
class ContentEntityType extends EntityType {

  /**
   * {@inheritdoc}
   */
  public $entity_type_class = 'Drupal\\Core\\Entity\\ContentEntityType';

  /**
   * {@inheritdoc}
   */
  public $group = 'content';

  /**
   * {@inheritdoc}
   */
  public function get() {
    $this->definition['group_label'] = new TranslatableMarkup('Content', [], [
      'context' => 'Entity type group',
    ]);
    return parent::get();
  }

}

Members

Name Modifiers Type Description Overridessort ascending
Plugin::__construct public function Constructs a Plugin object. 3
StringTranslationTrait::$stringTranslation protected property The string translation service. 3
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 1
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider 1
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass 1
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass 1
Plugin::$definition protected property The plugin definition read from the class annotation. 1
ContentEntityType::get public function Gets the value of an annotation. Overrides EntityType::get
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
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.
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
ContentEntityType::$entity_type_class public property The class used to represent the entity type. Overrides EntityType::$entity_type_class
ContentEntityType::$group public property The group machine name. Overrides EntityType::$group
EntityType::$group_label public property The group label.