EntityNG is now pretty much settled on naming:
- "field": the value objects found in an entity (e.g the value of node 12's 'body')
--> Drupal\Core\Entity\Field\Type\Field (+ Fieldnterface) and Drupal\Core\Entity\Field\FieldItemBase (+ FieldItemInterface)
- "field definition": the metadata about those fields (e.g the definition of 'body' on article nodes)
--> is about to introduce Drupal\Core\Entity\Field\FieldDefinitionInterface
Just like "fields" are both configurable ("Field API") fields and base fields, the FieldDefinitionInterface will unify the metadata formats for those two kinds of fields.
OTOH, what the "historic" Field API called "field" is the "field definition". In D8:
- the 'field_entity' entity type, and Drupal\field\Plugin\Core\Entity\Field (+ FieldInterface)
- the 'field_instance' entity type, and Drupal\field\Plugin\Core\Entity\FieldInstance (+ FieldInstanceInterface)
- the two being ConfigEntities, field.field.[field_name] / field.instance.[entity_type].[bundle].[field_name] in CMI
So we have:
- Field (entity ng): the values
- Field (field api): the definition of a "configurable field"
- FieldInstance (field api): the definition of a "configurable field" attached to a specific entity bundle
(note, we have two more "Field" classes in core:
- the one for "static access to services provided by field.module", similar to the \Drupal class - could be renamed FieldAPI, maybe
- one in Views)
Remember that "terminology" slide in the "old & new Field API" prez in Portland ? :-)
It bugs me a lot, but can't really see another way than to rename Field API config entity classes...
But to what ? with which entity type names and CMI prefixes ?
There is a definite risk of those various things getting excruciatingly long...
Here's a proposal that tries to limit name length where I feel there is less ambiguity:
- ConfigFieldDefinition / ConfigFieldDefinitionInterface
entity type: config_field
CMI: field.field.[field_name] (unchanged)
- ConfigFieldInstanceDefinition / ConfigFieldInstanceDefinition
entity type: config_field_instance
CMI: field.instance.[entity_type].[bundle].[field_name] (unchanged)
Renaming classes / interfaces should be relatively painless.
Renaming entity types shouldn't be too hard thoretically, except we're in the middle of ;-/
Renaming CMI files - not sure, possibly not that hard...
|PASSED: [[SimpleTest]]: [MySQL] 57,160 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] 57,443 pass(es), 1 fail(s), and 1 exception(s).|
|FAILED: [[SimpleTest]]: [MySQL] 57,392 pass(es), 1 fail(s), and 1 exception(s).|