public function SmartDateDefaultWidget::settingsForm in Smart Date 8.2
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsForm()
- 3.0.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsForm()
- 3.1.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsForm()
- 3.2.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsForm()
- 3.3.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsForm()
- 3.4.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsForm()
Returns a form to configure settings for the widget.
Invoked from \Drupal\field_ui\Form\EntityDisplayFormBase to allow administrators to configure the widget. The field_ui module takes care of handling submitted form values.
Parameters
array $form: The form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form definition for the widget settings.
Overrides WidgetBase::settingsForm
1 call to SmartDateDefaultWidget::settingsForm()
- SmartDateTimezoneWidget::settingsForm in src/
Plugin/ Field/ FieldWidget/ SmartDateTimezoneWidget.php - Returns a form to configure settings for the widget.
1 method overrides SmartDateDefaultWidget::settingsForm()
- SmartDateTimezoneWidget::settingsForm in src/
Plugin/ Field/ FieldWidget/ SmartDateTimezoneWidget.php - Returns a form to configure settings for the widget.
File
- src/
Plugin/ Field/ FieldWidget/ SmartDateDefaultWidget.php, line 44
Class
- SmartDateDefaultWidget
- Plugin implementation of the 'smartdate_default' widget.
Namespace
Drupal\smart_date\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element = parent::settingsForm($form, $form_state);
$element['modal'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Use modal for managing instances'),
'#default_value' => $this
->getSetting('modal'),
];
return $element;
}