protected property FieldConfigBase::$default_value_callback
The name of a callback function that returns default values.
The function will be called with the following arguments:
- \Drupal\Core\Entity\FieldableEntityInterface $entity The entity being created.
- \Drupal\Core\Field\FieldDefinitionInterface $definition The field definition.
It should return an array of default values, in the same format as the $default_value property.
This property takes precedence on the list of fixed values specified in the $default_value property.
Type: string
File
- core/lib/Drupal/Core/Field/FieldConfigBase.php, line 160
Class
- FieldConfigBase
- Base class for configurable field definitions.
Namespace
Drupal\Core\FieldCode
protected $default_value_callback = '';
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!FieldConfigBase.php/property/FieldConfigBase::default_value_callback/8.1.x