You are here

public static function FieldItemInterface::generateSampleValue in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldItemInterface.php \Drupal\Core\Field\FieldItemInterface::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.

1 method overrides FieldItemInterface::generateSampleValue()
FieldItemBase::generateSampleValue in core/lib/Drupal/Core/Field/FieldItemBase.php
Generates placeholder field values.

File

core/lib/Drupal/Core/Field/FieldItemInterface.php, line 244

Class

FieldItemInterface
Interface for entity field items.

Namespace

Drupal\Core\Field

Code

public static function generateSampleValue(FieldDefinitionInterface $field_definition);