function BooleanCheckboxWidget::settingsForm
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\BooleanCheckboxWidget::settingsForm()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\BooleanCheckboxWidget::settingsForm()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\BooleanCheckboxWidget::settingsForm()
Overrides WidgetBase::settingsForm
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ BooleanCheckboxWidget.php, line 34
Class
- BooleanCheckboxWidget
- Plugin implementation of the 'boolean_checkbox' widget.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['display_label'] = [
'#type' => 'checkbox',
'#title' => $this->t('Use field label instead of the "On" label as the label.'),
'#default_value' => $this->getSetting('display_label'),
'#weight' => -1,
];
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.