Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Entity / Annotation / ContentEntityType.php
1 <?php
2
3 namespace Drupal\Core\Entity\Annotation;
4 use Drupal\Core\StringTranslation\TranslatableMarkup;
5
6 /**
7  * Defines a content entity type annotation object.
8  *
9  * Content Entity type plugins use an object-based annotation method, rather than an
10  * array-type annotation method (as commonly used on other annotation types).
11  * The annotation properties of content entity types are found on
12  * \Drupal\Core\Entity\ContentEntityType and are accessed using
13  * get/set methods defined in \Drupal\Core\Entity\ContentEntityTypeInterface.
14  *
15  * @ingroup entity_api
16  *
17  * @Annotation
18  */
19 class ContentEntityType extends EntityType {
20
21   /**
22    * {@inheritdoc}
23    */
24   public $entity_type_class = 'Drupal\Core\Entity\ContentEntityType';
25
26   /**
27    * {@inheritdoc}
28    */
29   public $group = 'content';
30
31   /**
32    * {@inheritdoc}
33    */
34   public function get() {
35     $this->definition['group_label'] = new TranslatableMarkup('Content', [], ['context' => 'Entity type group']);
36
37     return parent::get();
38   }
39
40 }