You are here

public function FullcalendarOptions::defineOptions in FullCalendar 8

Same name and namespace in other branches
  1. 8.3 fullcalendar_options/src/Plugin/fullcalendar/type/FullcalendarOptions.php \Drupal\fullcalendar_options\Plugin\fullcalendar\type\FullcalendarOptions::defineOptions()

Overrides FullcalendarInterface::defineOptions

File

fullcalendar_options/src/Plugin/fullcalendar/type/FullcalendarOptions.php, line 22

Class

FullcalendarOptions
@todo.

Namespace

Drupal\fullcalendar_options\Plugin\fullcalendar\type

Code

public function defineOptions() {
  $options = [];
  foreach ($this
    ->optionsListParsed() as $key => $info) {
    $options[$key]['default'] = $info['#default_value'];

    // If this is a Boolean value, set the 'bool' flag for export.
    if (isset($info['#data_type']) && $info['#data_type'] == 'bool') {
      $options[$key]['bool'] = TRUE;
    }
  }
  return [
    'fullcalendar_options' => [
      'contains' => $options,
    ],
  ];
}