function LayoutBuilderDefaultValuesTest::defaultValueCallback
Same name in other branches
- 10 core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderDefaultValuesTest::defaultValueCallback()
- 11.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderDefaultValuesTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderDefaultValuesTest::defaultValueCallback()
Sample 'default value' callback.
File
-
core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderDefaultValuesTest.php, line 291
Class
- LayoutBuilderDefaultValuesTest
- Tests rendering default field values in Layout Builder.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
public static function defaultValueCallback(FieldableEntityInterface $entity, FieldDefinitionInterface $definition) {
return [
[
'value' => 'This is from my default value callback',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.