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..3692de2 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,22 @@ class Field extends ConfigEntityBase implements FieldInterface { protected $storageDetails; /** - * {@inheritdoc} + * Constructs a Field object. + * + * @param array $values + * An array of field properties, keyed by property name. Most array elements + * will be used to set the corresponding properties on the class; see the + * class property documentation for details. Some array elements have special + * meanings and a few are required; these special elements are: + * - id: required. As a temporary Backwards Compatibility layer right now, + * a 'field_name' property can be accepted in place of 'id'. + * - type: required. + * + * In most cases, it's constructed via entity_create('field_entity', $values)), where + * $values is the same parameter for this constructor. + * + * 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..b6c94ec 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,24 @@ class FieldInstance extends ConfigEntityBase implements FieldInstanceInterface { protected $bundle_rename_allowed = FALSE; /** - * {@inheritdoc} + * Constructs a Field instance object. + * + * @param array $values + * An array of field instance properties, keyed by property name. Most array + * elements will be used to set the corresponding properties on the class; see + * the class property documentation for details. Some array elements have + * special meanings and a few are required; these special elements are: + * - field_name: optional. The name of the field this is an instance of. + * - 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. + * + * In most cases, it's constructed via entity_create('field_instance', $values)), where + * $values is the same parameter for this constructor. + * + * 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