You are here

public static function ComputedIntegerItem::generateSampleValue in Computed Field 8.2

Same name and namespace in other branches
  1. 3.x 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 71

Class

ComputedIntegerItem
Plugin implementation of the 'computed_integer' field type.

Namespace

Drupal\computed_field\Plugin\Field\FieldType

Code

public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
  $values['value'] = rand(PHP_INT_MIN, PHP_INT_MAX);
  return $values;
}