Split from #2050801: Unify handling of default values between base and configurable fields

'default_value_callback' functions are currently only used for configurable fields, but base fields could easily be made to work with them too.
+ we're trying to limit the amount of code that has to work directly with the raw $field / $instance ConfigEntities specific to Field API "configurable fields", and establish FieldDefinitionInterface as the generic tool.

API changes:
dynamic 'default_value_function' callbacks change signatures:
before: callback(EntityInterface $entity, Field $field, FieldInstance $instance, $langcode)
after: callback(EntityInterface $entity, FieldDefinitionInterface $field_definition)

CommentFileSizeAuthor
#1 default_value_callback-2060907-1.patch4.92 KByched
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

yched’s picture

Issue summary: View changes
Status: Postponed » Closed (duplicate)