You are here

public static function TimeType::generateSampleValue in Time Field For Drupal 8.x / 9.x 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldType/TimeType.php \Drupal\time_field\Plugin\Field\FieldType\TimeType::generateSampleValue()

Generates placeholder field values.

Useful when populating site with placeholder content during site building or profiling.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

Return value

array An associative array of values.

Overrides FieldItemBase::generateSampleValue

File

src/Plugin/Field/FieldType/TimeType.php, line 77

Class

TimeType
Plugin implementation of the 'time' field type.

Namespace

Drupal\time_field\Plugin\Field\FieldType

Code

public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
  $values['value'] = 43200;
  return $values;
}