public static function FieldItemInterface::generateSampleValue in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldItemInterface.php \Drupal\Core\Field\FieldItemInterface::generateSampleValue()
- 9 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\FieldCode
public static function generateSampleValue(FieldDefinitionInterface $field_definition);