public static function ComputedIntegerItem::generateSampleValue in Computed Field 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/ComputedIntegerItem.php \Drupal\computed_field\Plugin\Field\FieldType\ComputedIntegerItem::generateSampleValue()
@todo Add useful code.
Overrides FieldItemBase::generateSampleValue
File
- src/
Plugin/ Field/ FieldType/ ComputedIntegerItem.php, line 72
Class
- ComputedIntegerItem
- Plugin implementation of the 'computed_integer' field type.
Namespace
Drupal\computed_field\Plugin\Field\FieldTypeCode
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$values['value'] = rand(PHP_INT_MIN, PHP_INT_MAX);
return $values;
}