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 e7e9bd5..90e1c45 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 @@ -210,7 +210,20 @@ class Field extends ConfigEntityBase implements FieldInterface { protected $storageDetails; /** - * {@inheritdoc} + * Constructs a Field object. + * + * In most cases, it's constructed via entity_create(). + * + * @param array $values + * An array of values to set, keyed by property name. You can put additional + * properties here and they'll be set on the class, see the class doc for + * detials of what those properties are. + * - id: required. As a temporary BC layer right now, a 'field_name' + * property can be accepted in place of 'id'. + * - type: required. + * + * 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 53132ec..7ebfe69 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 @@ -226,7 +226,22 @@ class FieldInstance extends ConfigEntityBase implements FieldInstanceInterface { protected $bundle_rename_allowed = FALSE; /** - * {@inheritdoc} + * Constructs a Field object. + * + * In most cases, it's constructed via entity_create(). + * + * @param array $values + * An array of values to set, keyed by property name. You can put additional + * properties here and they'll be set on the class, see the class doc for + * detials of what those properties are. + * - field_name: optional. This field instance is attached to this field. + * - field_uuid: optional. Either field_uuid or field_name is required + * to build field instance. field_name will gain higher priority. + * If field_name is not provided, field_uuid will be checked then. + * - entity_type: required. + * - bundle: required. + * + * 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