diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 37ed343..3e4f2a4 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -187,6 +187,11 @@ class EntityType implements EntityTypeInterface { protected $label = ''; /** + * A description of the entity type. + */ + protected $description = ''; + + /** * A callable that can be used to provide the entity URI. * * @var callable|null @@ -641,6 +646,13 @@ public function getLabel() { /** * {@inheritdoc} */ + public function getDescription() { + return $this->description; + } + + /** + * {@inheritdoc} + */ public function getLowercaseLabel() { return Unicode::strtolower($this->getLabel()); } diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index a1c1bc9..b3ffe90 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -609,6 +609,14 @@ public function getDataTable(); public function getLabel(); /** + * Returns the entity type's description + * + * @return string + * The entity type's description. + */ + public function getDescription(); + + /** * Returns the lowercase form of the human-readable entity type name. * * @return string diff --git a/core/modules/aggregator/src/Entity/Feed.php b/core/modules/aggregator/src/Entity/Feed.php index 368e8f1..54c334f 100644 --- a/core/modules/aggregator/src/Entity/Feed.php +++ b/core/modules/aggregator/src/Entity/Feed.php @@ -20,6 +20,7 @@ * @ContentEntityType( * id = "aggregator_feed", * label = @Translation("Aggregator feed"), + * description = @Translation("Feeds provide syndicated content (RSS, RDF, and Atom feeds.)"), * handlers = { * "storage" = "Drupal\aggregator\FeedStorage", * "view_builder" = "Drupal\aggregator\FeedViewBuilder", diff --git a/core/modules/aggregator/src/Entity/Item.php b/core/modules/aggregator/src/Entity/Item.php index 445f42e..85b31e3 100644 --- a/core/modules/aggregator/src/Entity/Item.php +++ b/core/modules/aggregator/src/Entity/Item.php @@ -21,6 +21,7 @@ * @ContentEntityType( * id = "aggregator_item", * label = @Translation("Aggregator feed item"), + * description = @Translation("An item from a syndicated feed."), * handlers = { * "storage" = "Drupal\aggregator\ItemStorage", * "view_builder" = "Drupal\aggregator\ItemViewBuilder", diff --git a/core/modules/block/src/Entity/Block.php b/core/modules/block/src/Entity/Block.php index ee977d0..cb62c34 100644 --- a/core/modules/block/src/Entity/Block.php +++ b/core/modules/block/src/Entity/Block.php @@ -21,6 +21,7 @@ * @ConfigEntityType( * id = "block", * label = @Translation("Block"), + * description = @Translation("Block configurations created in Drupal."), * handlers = { * "access" = "Drupal\block\BlockAccessControlHandler", * "view_builder" = "Drupal\block\BlockViewBuilder", diff --git a/core/modules/block_content/src/Entity/BlockContent.php b/core/modules/block_content/src/Entity/BlockContent.php index 310edf3..e930fb0 100644 --- a/core/modules/block_content/src/Entity/BlockContent.php +++ b/core/modules/block_content/src/Entity/BlockContent.php @@ -19,6 +19,7 @@ * @ContentEntityType( * id = "block_content", * label = @Translation("Custom Block"), + * description = @Translation("Blocks are custom pieces of content."), * bundle_label = @Translation("Custom Block type"), * handlers = { * "storage" = "Drupal\block_content\BlockContentStorage", diff --git a/core/modules/block_content/src/Entity/BlockContentType.php b/core/modules/block_content/src/Entity/BlockContentType.php index c8f325c..2c37c7b 100644 --- a/core/modules/block_content/src/Entity/BlockContentType.php +++ b/core/modules/block_content/src/Entity/BlockContentType.php @@ -18,6 +18,7 @@ * @ConfigEntityType( * id = "block_content_type", * label = @Translation("Custom block type"), + * description = @Translation("Types of blocks that can be created."), * handlers = { * "form" = { * "default" = "Drupal\block_content\BlockContentTypeForm", diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php index 43fc3f2..2a2d7e4 100644 --- a/core/modules/comment/src/Entity/Comment.php +++ b/core/modules/comment/src/Entity/Comment.php @@ -22,6 +22,7 @@ * @ContentEntityType( * id = "comment", * label = @Translation("Comment"), + * description = @Translation("Comments are responses to node content."), * bundle_label = @Translation("Content type"), * handlers = { * "storage" = "Drupal\comment\CommentStorage", diff --git a/core/modules/comment/src/Entity/CommentType.php b/core/modules/comment/src/Entity/CommentType.php index 3a1b3a8..9692f8a 100644 --- a/core/modules/comment/src/Entity/CommentType.php +++ b/core/modules/comment/src/Entity/CommentType.php @@ -17,6 +17,7 @@ * @ConfigEntityType( * id = "comment_type", * label = @Translation("Comment type"), + * description = @Translation("Comment types allow different types of comments."), * handlers = { * "form" = { * "default" = "Drupal\comment\CommentTypeForm", diff --git a/core/modules/contact/src/Entity/ContactForm.php b/core/modules/contact/src/Entity/ContactForm.php index 53476f7..1bf1f57 100644 --- a/core/modules/contact/src/Entity/ContactForm.php +++ b/core/modules/contact/src/Entity/ContactForm.php @@ -18,6 +18,7 @@ * @ConfigEntityType( * id = "contact_form", * label = @Translation("Contact form"), + * description = @Translation("Configuration for contact forms."), * handlers = { * "access" = "Drupal\contact\ContactFormAccessControlHandler", * "list_builder" = "Drupal\contact\ContactFormListBuilder", diff --git a/core/modules/contact/src/Entity/Message.php b/core/modules/contact/src/Entity/Message.php index 9d2269e..5181ff0 100644 --- a/core/modules/contact/src/Entity/Message.php +++ b/core/modules/contact/src/Entity/Message.php @@ -18,6 +18,7 @@ * @ContentEntityType( * id = "contact_message", * label = @Translation("Contact message"), + * description = @Translation("Contact messages are contact form submissions."), * handlers = { * "storage" = "Drupal\Core\Entity\ContentEntityNullStorage", * "view_builder" = "Drupal\contact\MessageViewBuilder", diff --git a/core/modules/editor/src/Entity/Editor.php b/core/modules/editor/src/Entity/Editor.php index 29f7350..3bed96e 100644 --- a/core/modules/editor/src/Entity/Editor.php +++ b/core/modules/editor/src/Entity/Editor.php @@ -16,6 +16,7 @@ * @ConfigEntityType( * id = "editor", * label = @Translation("Text Editor"), + * description = @Translation("Configuration for a text editor."), * entity_keys = { * "id" = "format" * } diff --git a/core/modules/file/src/Entity/File.php b/core/modules/file/src/Entity/File.php index 28d1ab65..ff0a982 100644 --- a/core/modules/file/src/Entity/File.php +++ b/core/modules/file/src/Entity/File.php @@ -21,6 +21,7 @@ * @ContentEntityType( * id = "file", * label = @Translation("File"), + * description = @Translation("Files that are managed within Drupal."), * handlers = { * "storage" = "Drupal\file\FileStorage", * "access" = "Drupal\file\FileAccessControlHandler", diff --git a/core/modules/filter/src/Entity/FilterFormat.php b/core/modules/filter/src/Entity/FilterFormat.php index c293025..7db5afe 100644 --- a/core/modules/filter/src/Entity/FilterFormat.php +++ b/core/modules/filter/src/Entity/FilterFormat.php @@ -20,6 +20,7 @@ * @ConfigEntityType( * id = "filter_format", * label = @Translation("Text format"), + * description = @Translations("Text format configuration to filter content before display."), * handlers = { * "form" = { * "add" = "Drupal\filter\FilterFormatAddForm", diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index 4506891..f632124 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -26,6 +26,7 @@ * @ConfigEntityType( * id = "image_style", * label = @Translation("Image style"), + * description = @Translation("Image styles provide manipulation tools and formats for images."), * handlers = { * "form" = { * "add" = "Drupal\image\Form\ImageStyleAddForm", diff --git a/core/modules/language/src/Entity/ConfigurableLanguage.php b/core/modules/language/src/Entity/ConfigurableLanguage.php index c252010..e360647 100644 --- a/core/modules/language/src/Entity/ConfigurableLanguage.php +++ b/core/modules/language/src/Entity/ConfigurableLanguage.php @@ -20,6 +20,7 @@ * @ConfigEntityType( * id = "configurable_language", * label = @Translation("Language"), + * description = @Translation("Languages allow for content translation"), * handlers = { * "list_builder" = "Drupal\language\LanguageListBuilder", * "access" = "Drupal\language\LanguageAccessControlHandler", diff --git a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php index 2d41ba8..2d9d721 100644 --- a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php +++ b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php @@ -20,6 +20,7 @@ * @ContentEntityType( * id = "menu_link_content", * label = @Translation("Custom menu link"), + * description = @Translation("Custom menu links that belong to a menu."), * handlers = { * "storage" = "Drupal\Core\Entity\ContentEntityDatabaseStorage", * "access" = "Drupal\menu_link_content\MenuLinkContentAccessControlHandler", diff --git a/core/modules/migrate/src/Entity/Migration.php b/core/modules/migrate/src/Entity/Migration.php index 841171a..19ec2e4 100644 --- a/core/modules/migrate/src/Entity/Migration.php +++ b/core/modules/migrate/src/Entity/Migration.php @@ -21,6 +21,7 @@ * @ConfigEntityType( * id = "migration", * label = @Translation("Migration"), + * description = @Translation("Migration handles the transfer of content."), * module = "migrate", * handlers = { * "storage" = "Drupal\migrate\MigrationStorage" diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php index b96e9d2..5c61e26 100644 --- a/core/modules/node/src/Entity/Node.php +++ b/core/modules/node/src/Entity/Node.php @@ -23,6 +23,7 @@ * id = "node", * label = @Translation("Content"), * bundle_label = @Translation("Content type"), + * description = @Translation("Nodes are individual pieces of content."), * handlers = { * "storage" = "Drupal\node\NodeStorage", * "view_builder" = "Drupal\node\NodeViewBuilder", diff --git a/core/modules/node/src/Entity/NodeType.php b/core/modules/node/src/Entity/NodeType.php index 22f66d4..0908494 100644 --- a/core/modules/node/src/Entity/NodeType.php +++ b/core/modules/node/src/Entity/NodeType.php @@ -18,6 +18,7 @@ * @ConfigEntityType( * id = "node_type", * label = @Translation("Content type"), + * description = @Translation("Content types allow for different node configurations."), * handlers = { * "access" = "Drupal\node\NodeTypeAccessControlHandler", * "form" = { diff --git a/core/modules/rdf/src/Entity/RdfMapping.php b/core/modules/rdf/src/Entity/RdfMapping.php index b842547..cc4192b 100644 --- a/core/modules/rdf/src/Entity/RdfMapping.php +++ b/core/modules/rdf/src/Entity/RdfMapping.php @@ -17,6 +17,7 @@ * @ConfigEntityType( * id = "rdf_mapping", * label = @Translation("RDF mapping"), + * description = @Translation("RDF mapping enriches Drupal's markup with metadata."), * config_prefix = "mapping", * entity_keys = { * "id" = "id" diff --git a/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php b/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php index 3e8440e..b95346d 100644 --- a/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php +++ b/core/modules/responsive_image/src/Entity/ResponsiveImageMapping.php @@ -16,6 +16,7 @@ * @ConfigEntityType( * id = "responsive_image_mapping", * label = @Translation("Responsive image mapping"), + * description = @Translation("Responsive image mapping allows breakpoints to map to image formatters."), * handlers = { * "list_builder" = "Drupal\responsive_image\ResponsiveImageMappingListBuilder", * "form" = { diff --git a/core/modules/search/src/Entity/SearchPage.php b/core/modules/search/src/Entity/SearchPage.php index 28aa0f8..2a7d3a6 100644 --- a/core/modules/search/src/Entity/SearchPage.php +++ b/core/modules/search/src/Entity/SearchPage.php @@ -22,6 +22,7 @@ * @ConfigEntityType( * id = "search_page", * label = @Translation("Search page"), + * description = @Translation("Search by keyword results page."), * handlers = { * "access" = "Drupal\search\SearchPageAccessControlHandler", * "storage" = "Drupal\Core\Config\Entity\ConfigEntityStorage", diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index e6fcf49..2114453 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -21,6 +21,7 @@ * @ContentEntityType( * id = "shortcut", * label = @Translation("Shortcut link"), + * description = @Translation("Shortcut links provide quick administrative access."), * handlers = { * "access" = "Drupal\shortcut\ShortcutAccessControlHandler", * "form" = { diff --git a/core/modules/shortcut/src/Entity/ShortcutSet.php b/core/modules/shortcut/src/Entity/ShortcutSet.php index a9fc866..8632076 100644 --- a/core/modules/shortcut/src/Entity/ShortcutSet.php +++ b/core/modules/shortcut/src/Entity/ShortcutSet.php @@ -17,6 +17,7 @@ * @ConfigEntityType( * id = "shortcut_set", * label = @Translation("Shortcut set"), + * description = @Translation("Shortcut sets contain different shortcuts."), * handlers = { * "storage" = "Drupal\shortcut\ShortcutSetStorage", * "access" = "Drupal\shortcut\ShortcutSetAccessControlHandler", diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php index 3993dcf..afbeceb 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php @@ -20,6 +20,7 @@ * @ContentEntityType( * id = "entity_test", * label = @Translation("Test entity"), + * description = @Translation("Test entities are the base for other test entities."), * handlers = { * "list_builder" = "Drupal\entity_test\EntityTestListBuilder", * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php index 0f8eaef..63c4d04 100644 --- a/core/modules/taxonomy/src/Entity/Term.php +++ b/core/modules/taxonomy/src/Entity/Term.php @@ -19,6 +19,7 @@ * @ContentEntityType( * id = "taxonomy_term", * label = @Translation("Taxonomy term"), + * description = @Translation("Taxonomy terms allow categorization of content."), * bundle_label = @Translation("Vocabulary"), * handlers = { * "storage" = "Drupal\taxonomy\TermStorage", diff --git a/core/modules/taxonomy/src/Entity/Vocabulary.php b/core/modules/taxonomy/src/Entity/Vocabulary.php index 589ad88..4900353 100644 --- a/core/modules/taxonomy/src/Entity/Vocabulary.php +++ b/core/modules/taxonomy/src/Entity/Vocabulary.php @@ -17,6 +17,7 @@ * @ConfigEntityType( * id = "taxonomy_vocabulary", * label = @Translation("Taxonomy vocabulary"), + * description = @Translation("Taxonomy vocabularies contain taxonomy terms."), * handlers = { * "storage" = "Drupal\taxonomy\VocabularyStorage", * "list_builder" = "Drupal\taxonomy\VocabularyListBuilder", diff --git a/core/modules/tour/src/Entity/Tour.php b/core/modules/tour/src/Entity/Tour.php index 55b94f1..bd27b5e 100644 --- a/core/modules/tour/src/Entity/Tour.php +++ b/core/modules/tour/src/Entity/Tour.php @@ -18,6 +18,7 @@ * @ConfigEntityType( * id = "tour", * label = @Translation("Tour"), + * descriptions @Translation("Tours provide users with interactive demonstrations."), * handlers = { * "view_builder" = "Drupal\tour\TourViewBuilder" * }, diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php index 9eba859..a352268 100644 --- a/core/modules/user/src/Entity/Role.php +++ b/core/modules/user/src/Entity/Role.php @@ -17,6 +17,7 @@ * @ConfigEntityType( * id = "user_role", * label = @Translation("Role"), + * description = @Translation("Roles allow users to have permissions in Drupal."), * handlers = { * "storage" = "Drupal\user\RoleStorage", * "access" = "Drupal\user\RoleAccessControlHandler", diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index a8d5101..db7044e 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -23,6 +23,7 @@ * @ContentEntityType( * id = "user", * label = @Translation("User"), + * description = @Translation("Users are accounts in the Drupal site."), * handlers = { * "storage" = "Drupal\user\UserStorage", * "access" = "Drupal\user\UserAccessControlHandler", diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 1ad685a..0cadc63 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -19,6 +19,7 @@ * @ConfigEntityType( * id = "view", * label = @Translation("View"), + * description = @Translation("Views create customized lists and queries."), * handlers = { * "access" = "Drupal\views\ViewAccessControlHandler" * },