field_test.field.inc
Same filename in other branches
File
-
core/
modules/ field/ tests/ modules/ field_test/ field_test.field.inc
View source
<?php
/**
* @file
* Defines a field type and its formatters and widgets.
*/
declare (strict_types=1);
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
/**
* Sample 'default value' callback.
*/
function field_test_default_value(FieldableEntityInterface $entity, FieldDefinitionInterface $definition) {
return [
[
'value' => 99,
],
];
}
Functions
Title | Deprecated | Summary |
---|---|---|
field_test_default_value | Sample 'default value' callback. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.