You are here

public function FullCalendar::validateOptionsForm in FullCalendar 8.3

Same name and namespace in other branches
  1. 8.5 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::validateOptionsForm()
  2. 8 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::validateOptionsForm()
  3. 8.2 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::validateOptionsForm()
  4. 8.4 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::validateOptionsForm()

Validate the options form.

Overrides StylePluginBase::validateOptionsForm

File

src/Plugin/views/style/FullCalendar.php, line 167

Class

FullCalendar
Plugin annotation @ViewsStyle( id = "fullcalendar", title = @Translation("FullCalendar"), help = @Translation("Displays items on a calendar."), theme = "fullcalendar", theme_file = "fullcalendar.theme.inc", display_types = {"normal"} )

Namespace

Drupal\fullcalendar\Plugin\views\style

Code

public function validateOptionsForm(&$form, FormStateInterface $form_state) {
  parent::validateOptionsForm($form, $form_state);

  // Cast all submitted values to their proper type.
  // TODO Remove once https://drupal.org/node/1653026 is in.
  if ($form_state
    ->getValue('style_options')) {
    $this
      ->castNestedValues($form_state
      ->getValue('style_options'), $form);
  }
}