function BooleanItem::getSettableValues

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php \Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem::getSettableValues()
  2. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php \Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem::getSettableValues()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php \Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem::getSettableValues()

Returns an array of settable values.

If the optional $account parameter is passed, then the array is filtered to values settable by the account.

Parameters

\Drupal\Core\Session\AccountInterface $account: (optional) The user account for which to filter the settable values. If omitted, all settable values are returned.

Return value

array An array of settable values.

Overrides OptionsProviderInterface::getSettableValues

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php, line 104

Class

BooleanItem
Defines the 'boolean' entity field type.

Namespace

Drupal\Core\Field\Plugin\Field\FieldType

Code

public function getSettableValues(AccountInterface $account = NULL) {
    return [
        0,
        1,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.