blob: 76c2117ffa074f77c5021fd9158cf65f8a13f7c9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
namespace Drupal\user;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem;
/**
* Defines the 'status' entity field type.
*
* @todo Consider making this a full field type plugin in
* https://www.drupal.org/project/drupal/issues/2936864.
*/
class StatusItem extends BooleanItem {
/**
* {@inheritdoc}
*/
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
// Always generate a sample with an enabled status.
$values['value'] = 1;
return $values;
}
}
|