function BooleanItem::getPossibleOptions
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php \Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem::getPossibleOptions()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php \Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem::getPossibleOptions()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php \Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem::getPossibleOptions()
Overrides OptionsProviderInterface::getPossibleOptions
1 call to BooleanItem::getPossibleOptions()
- BooleanItem::getSettableOptions in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ BooleanItem.php - Returns an array of settable values with labels for display.
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ BooleanItem.php, line 94
Class
- BooleanItem
- Defines the 'boolean' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public function getPossibleOptions(?AccountInterface $account = NULL) {
return [
0 => $this->getSetting('off_label'),
1 => $this->getSetting('on_label'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.