diff --git a/core/lib/Drupal/Core/Entity/ContentEntityInterface.php b/core/lib/Drupal/Core/Entity/ContentEntityInterface.php index fde6af9..e2c22ec 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityInterface.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityInterface.php @@ -42,8 +42,14 @@ public function initTranslation($langcode); /** * Defines the base fields of the entity type. * - * Implementations may use the class \Drupal\Core\Field\FieldDefinition for - * creating the field definitions. + * Implementations typically use the class \Drupal\Core\Field\FieldDefinition + * for creating the field definitions; for example a 'name' field could be + * defined as the following: + * @code + * $fields['name'] = FieldDefinition::create() + * ->setLabel(t('Name')) + * ->setFieldType('string'); + * @endcode * * @param string $entity_type * The entity type to return properties for. Useful when a single class is