class FieldDefaultValueCallbackProvider

Same name in other branches
  1. 9 core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php \Drupal\field_test\FieldDefaultValueCallbackProvider
  2. 8.9.x core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php \Drupal\field_test\FieldDefaultValueCallbackProvider
  3. 10 core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php \Drupal\field_test\FieldDefaultValueCallbackProvider

Helper class for \Drupal\Tests\field\Functional\FieldDefaultValueCallbackTest.

Hierarchy

Expanded class hierarchy of FieldDefaultValueCallbackProvider

File

core/modules/field/tests/modules/field_test/src/FieldDefaultValueCallbackProvider.php, line 10

Namespace

Drupal\field_test
View source
class FieldDefaultValueCallbackProvider {
    
    /**
     * Helper callback calculating a default value.
     */
    public static function calculateDefaultValue() {
        return [
            [
                'value' => 'Calculated default value',
            ],
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary
FieldDefaultValueCallbackProvider::calculateDefaultValue public static function Helper callback calculating a default value.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.