Mercurial > hg > cmmr2012-drupal-site
view core/modules/user/src/StatusItem.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line source
<?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; } }