diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php index 36e263f..af97b34 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php @@ -211,30 +211,24 @@ class Field extends ConfigEntityBase implements FieldInterface { /** * Constructs a Field object. - * In most cases, it's constructed via entity_create('field_entity', $values). + * + * In most cases, it's constructed via entity_create(). * * @param array $values * An array of values to set, keyed by property name. For specific property - * description, please refer respective property inside this class. - * - id: required. It's used to replace the original 'field_name' property. - * Only lowercase alphanumeric characters and underscores are allowed, and - * only lowercase letters and underscore are allowed as the first character. - * - type: required. - * - module: optional. - * - active: optional. - * - settings: optional. - * - cardinality: optional. Default to be 1. - * - translatable: optional. Default to be FALSE. - * - entity_types: optional. - * - locked: optional. Default to be FALSE. - * - storage: optional. - * - indexes: optional. - * - deleted: optional. Default to be FALSE. - * - schema: optional. - * - storageDetails: optional. - * - * See: @link entity_create @endlink. - * See: @link field Field API data structures @endlink. + * description, please refer to respective property inside this class. + * - Id: required. Only lowercase alphanumeric characters and underscores + * are allowed, and only lowercase letters and underscore are allowed + * as the first character. + * - Type: required. + * - Settings: optional. + * - Cardinality: optional. Defaults to 1. + * - Translatable: optional. Defaults to FALSE. + * - Locked: optional. Defaults to FALSE. + * - Indexes: optional. + * + * See: @link entity_create() @endlink. + * @ingroup field Field API data structures */ public function __construct(array $values, $entity_type = 'field_entity') { // Check required properties. diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php index 8c7a422..b55bc65 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php @@ -227,30 +227,24 @@ class FieldInstance extends ConfigEntityBase implements FieldInstanceInterface { /** * Constructs a Field object. - * In most cases, it's constructed via entity_create('field_instance', $values). + * + * In most cases, it's constructed via entity_create(). * * @param array $values * An array of values to set, keyed by property name. For specific property * description, please refer respective property inside this class. - * - field_name: optional. This field instance is attached to this field. - * - field_uuid: optional. Either this property or field_name is required + * - Field_name: optional. This field instance is attached to this field. + * - Field_uuid: optional. Either this property or field_name is required * to build field instance. Property field_name will gain higher priority. - * If field_name is not provided, field_uuid will be checked. - * - entity_type: required. - * - bundle: required. - * - label: optional. - * - description: optional. - * - settings: optional. - * - required: optional. Default to be FALSE. - * - default_value: optional. - * - default_value_function: optional. - * - widget: optional. - * - deleted: optional. Default to be FALSE. - * - field: optional. - * - widgetPlugin: optional. - * - bundle_rename_allowed : optional. - * - * See: @link entity_create @endlink. + * If field_name is not provided, field_uuid will be checked then. + * - Entity_type: required. + * - Bundle: required. + * - Description: optional. + * - Required: optional. Defaults to FALSE. + * - Default_value: optional. + * - Default_value_function: optional. + * + * See: @link entity_create() @endlink. */ public function __construct(array $values, $entity_type = 'field_instance') { // Accept incoming 'field_name' instead of 'field_uuid', for easier DX on