public function FullCalendar::submitOptionsForm in FullCalendar 8.2
Same name in this branch
- 8.2 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::submitOptionsForm()
- 8.2 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::submitOptionsForm()
Same name and namespace in other branches
- 8.5 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::submitOptionsForm()
- 8 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::submitOptionsForm()
- 8.3 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::submitOptionsForm()
- 8.4 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::submitOptionsForm()
Overrides FullcalendarBase::submitOptionsForm
File
- src/
Plugin/ fullcalendar/ type/ FullCalendar.php, line 963
Class
- FullCalendar
- Plugin annotation @FullcalendarOption( id = "fullcalendar", module = "fullcalendar", js = TRUE, weight = "-20" )
Namespace
Drupal\fullcalendar\Plugin\fullcalendar\typeCode
public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = []) {
$options = $form_state
->getValue('style_options');
// These field options have empty defaults, make sure they stay that way.
foreach ([
'title',
'url',
'date',
] as $field) {
if (empty($options['fields'][$field]) && isset($options['fields'][$field . '_field'])) {
unset($options['fields'][$field . '_field']);
}
}
}