public function DateRecurModularSierraWidget::reloadRecurrenceDropdownCallback in Recurring Date Field Modular Widgets 8
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldWidget/DateRecurModularSierraWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularSierraWidget::reloadRecurrenceDropdownCallback()
- 2.x src/Plugin/Field/FieldWidget/DateRecurModularSierraWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularSierraWidget::reloadRecurrenceDropdownCallback()
Callback to reload contents of 'recurrence_option' element.
File
- src/
Plugin/ Field/ FieldWidget/ DateRecurModularSierraWidget.php, line 807
Class
- DateRecurModularSierraWidget
- Date recur sierra widget.
Namespace
Drupal\date_recur_modular\Plugin\Field\FieldWidgetCode
public function reloadRecurrenceDropdownCallback(array &$form, FormStateInterface $form_state) {
$button = $form_state
->getTriggeringElement();
$element = NestedArray::getValue($form, array_slice($button['#array_parents'], 0, -2));
return $element['recurrence_option'];
}