function EmailItem::generateSampleValue
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EmailItem::generateSampleValue()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EmailItem::generateSampleValue()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EmailItem::generateSampleValue()
Overrides FieldItemBase::generateSampleValue
1 call to EmailItem::generateSampleValue()
- EntityUser::processStubRow in core/
modules/ user/ src/ Plugin/ migrate/ destination/ EntityUser.php - Populates as much of the stub row as possible.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EmailItem.php, line 72
Class
- EmailItem
- Defines the 'email' field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$random = new Random();
$values['value'] = $random->name() . '@example.com';
return $values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.