function TelephoneItem::generateSampleValue
Overrides FieldItemBase::generateSampleValue
File
-
core/
modules/ telephone/ src/ Plugin/ Field/ FieldType/ TelephoneItem.php, line 88
Class
- TelephoneItem
- Plugin implementation of the 'telephone' field type.
Namespace
Drupal\telephone\Plugin\Field\FieldTypeCode
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$values['value'] = rand(pow(10, 8), pow(10, 9) - 1);
return $values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.