ContentEntityType.php 996 B

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