function StringLongItem::generateSampleValue
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php \Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem::generateSampleValue()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php \Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem::generateSampleValue()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php \Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem::generateSampleValue()
Overrides FieldItemBase::generateSampleValue
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ StringLongItem.php, line 45
Class
- StringLongItem
- Defines the 'string_long' field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$random = new Random();
$values['value'] = $random->paragraphs();
return $values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.