class ContentEntityType
Same name in this branch
- 11.x core/lib/Drupal/Core/Entity/ContentEntityType.php \Drupal\Core\Entity\ContentEntityType
- 11.x core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php \Drupal\Core\Entity\Annotation\ContentEntityType
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityType.php \Drupal\Core\Entity\ContentEntityType
- 9 core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php \Drupal\Core\Entity\Annotation\ContentEntityType
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityType.php \Drupal\Core\Entity\ContentEntityType
- 8.9.x core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php \Drupal\Core\Entity\Annotation\ContentEntityType
- 10 core/lib/Drupal/Core/Entity/ContentEntityType.php \Drupal\Core\Entity\ContentEntityType
- 10 core/lib/Drupal/Core/Entity/Annotation/ContentEntityType.php \Drupal\Core\Entity\Annotation\ContentEntityType
Defines a content entity type for plugin discovery.
Content entity type plugins use an object-based attribute method, rather than an array-type (as commonly used on other plugin types). The attribute 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
- class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
- class \Drupal\Core\Entity\Attribute\EntityType extends \Drupal\Component\Plugin\Attribute\Plugin
- class \Drupal\Core\Entity\Attribute\ContentEntityType extends \Drupal\Core\Entity\Attribute\EntityType
- class \Drupal\Core\Entity\Attribute\EntityType extends \Drupal\Component\Plugin\Attribute\Plugin
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
Expanded class hierarchy of ContentEntityType
See also
\Drupal\Core\Entity\EntityType
\Drupal\Core\Entity\ContentEntityType
\Drupal\Core\Entity\ContentEntityTypeInterface
Related topics
62 files declare their use of ContentEntityType
- BlockContent.php in core/
modules/ block_content/ src/ Entity/ BlockContent.php - Comment.php in core/
modules/ comment/ src/ Entity/ Comment.php - CommentTestBaseField.php in core/
modules/ comment/ tests/ modules/ comment_base_field_test/ src/ Entity/ CommentTestBaseField.php - ContentModerationState.php in core/
modules/ content_moderation/ src/ Entity/ ContentModerationState.php - EntitySerializedField.php in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntitySerializedField.php
File
-
core/
lib/ Drupal/ Core/ Entity/ Attribute/ ContentEntityType.php, line 22
Namespace
Drupal\Core\Entity\AttributeView source
class ContentEntityType extends EntityType {
public function __construct(string $id, ?TranslatableMarkup $label = NULL, ?TranslatableMarkup $label_collection = NULL, ?TranslatableMarkup $label_singular = NULL, ?TranslatableMarkup $label_plural = NULL, string $entity_type_class = 'Drupal\\Core\\Entity\\ContentEntityType', string $group = 'content', TranslatableMarkup $group_label = new TranslatableMarkup('Content', [], [
'context' => 'Entity type group',
]), bool $static_cache = TRUE, bool $render_cache = TRUE, bool $persistent_cache = TRUE, array $entity_keys = [], array $handlers = [], array $links = [], ?string $admin_permission = NULL, ?string $collection_permission = NULL, string $permission_granularity = 'entity_type', ?string $bundle_entity_type = NULL, ?string $bundle_of = NULL, ?TranslatableMarkup $bundle_label = NULL, ?string $base_table = NULL, ?string $data_table = NULL, ?string $revision_table = NULL, ?string $revision_data_table = NULL, bool $internal = FALSE, bool $translatable = FALSE, bool $show_revision_ui = FALSE, array $label_count = [], ?string $uri_callback = NULL, ?string $field_ui_base_route = NULL, bool $common_reference_target = FALSE, array $list_cache_contexts = [], array $list_cache_tags = [], array $constraints = [], array $revision_metadata_keys = [], array $additional = []) {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AttributeBase::$class | protected | property | The class used for this attribute class. | ||
AttributeBase::$provider | protected | property | The provider of the attribute class. | ||
AttributeBase::getClass | public | function | Gets the class of the attribute class. | Overrides AttributeInterface::getClass | 1 |
AttributeBase::getId | public | function | Gets the unique ID for this attribute class. | Overrides AttributeInterface::getId | |
AttributeBase::getProvider | public | function | Gets the name of the provider of the attribute class. | Overrides AttributeInterface::getProvider | |
AttributeBase::setClass | public | function | Sets the class of the attributed class. | Overrides AttributeInterface::setClass | 1 |
AttributeBase::setProvider | public | function | Sets the name of the provider of the attribute class. | Overrides AttributeInterface::setProvider | |
ContentEntityType::__construct | public | function | Constructs a plugin attribute object. | Overrides EntityType::__construct | |
EntityType::get | public | function | Gets the value of an attribute. | Overrides AttributeBase::get |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.