function StatusItem::generateSampleValue
Same name in other branches
- 9 core/modules/user/src/StatusItem.php \Drupal\user\StatusItem::generateSampleValue()
- 8.9.x core/modules/user/src/StatusItem.php \Drupal\user\StatusItem::generateSampleValue()
- 10 core/modules/user/src/StatusItem.php \Drupal\user\StatusItem::generateSampleValue()
Overrides BooleanItem::generateSampleValue
File
-
core/
modules/ user/ src/ StatusItem.php, line 19
Class
- StatusItem
- Defines the 'status' entity field type.
Namespace
Drupal\userCode
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
// Always generate a sample with an enabled status.
$values['value'] = 1;
return $values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.