function FieldDefaultValueCallbackProvider::calculateDefaultValue
Same name in other branches
- 8.9.x core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php \Drupal\field_test\FieldDefaultValueCallbackProvider::calculateDefaultValue()
- 10 core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php \Drupal\field_test\FieldDefaultValueCallbackProvider::calculateDefaultValue()
- 11.x core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php \Drupal\field_test\FieldDefaultValueCallbackProvider::calculateDefaultValue()
Helper callback calculating a default value.
File
-
core/
modules/ field/ tests/ modules/ field_test/ src/ FieldDefaultValueCallbackProvider.php, line 13
Class
- FieldDefaultValueCallbackProvider
- Helper class for \Drupal\Tests\field\Functional\FieldDefaultValueCallbackTest.
Namespace
Drupal\field_testCode
public static function calculateDefaultValue() {
return [
[
'value' => 'Calculated default value',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.