Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
API page: https://api.drupal.org/api/drupal/modules%21field%21field.module/functio...
This function invents a callback:
$function = $instance['default_value_function'];
if (function_exists($function)) {
$items = $function($entity_type, $entity, $field, $instance, $langcode);
}
but I can't see documentation for it anywhere (nor indeed can I find use of it in core!).
It looks like this is a method on the field instance class in D8, so perhaps documentation is available there that could be used as a starting point for fixing this?
Comments
Comment #1
jhodgdonNo idea there...
Comment #2
joachim CreditAttribution: joachim commentedSee public $default_value_callback in Drupal\Core\Field\FieldConfigBase and other parts of that class.
Comment #3
Sutharsan CreditAttribution: Sutharsan commented