Identifiers

The entity type annotations start with some basic information about them, ID, label, and things like that. For example, consider the following Node entity:

 *   id = "node", *   label = @Translation("Content"), *   label_singular = @Translation("content item"), *   label_plural = @Translation("content items"), *   label_count = @PluralTranslation( *     singular = "@count content item", *     plural = "@count content items" *   ),

These are used in various places in the system to properly be able to reference the entity type by machine and human readable names.

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.