You are here

function colorbox_fullcalendar_options_form in FullCalendar 8.3

Same name and namespace in other branches
  1. 8 fullcalendar_options/includes/colorbox.fullcalendar.inc \colorbox_fullcalendar_options_form()
  2. 7.2 fullcalendar_options/includes/colorbox.fullcalendar.inc \colorbox_fullcalendar_options_form()

Implements hook_fullcalendar_options_form().

File

fullcalendar_options/includes/colorbox.fullcalendar.inc, line 53
Provides extra FullCalendar configuration options for Colorbox.

Code

function colorbox_fullcalendar_options_form(&$form, FormStateInterface $form_state, &$view) {
  $form['colorbox']['colorbox'] = [
    '#type' => 'checkbox',
    '#title' => t('Open events with Colorbox'),
    '#default_value' => $view->options['colorbox']['colorbox'],
    '#data_type' => 'bool',
  ];
  $form['colorbox']['colorboxIFrame'] = [
    '#type' => 'checkbox',
    '#title' => t('Open events in iFrame'),
    '#default_value' => $view->options['colorbox']['colorboxIFrame'],
    '#dependency' => [
      'edit-style-options-colorbox-colorbox' => [
        1,
      ],
    ],
    '#data_type' => 'bool',
  ];
  $form['colorbox']['colorboxClass'] = [
    '#type' => 'textfield',
    '#title' => t('Classname or ID selector'),
    '#default_value' => $view->options['colorbox']['colorboxClass'],
    '#dependency' => [
      'edit-style-options-colorbox-colorbox' => [
        1,
      ],
    ],
  ];
  $form['colorbox']['colorboxWidth'] = [
    '#type' => 'textfield',
    '#title' => t('Width'),
    '#default_value' => $view->options['colorbox']['colorboxWidth'],
    '#dependency' => [
      'edit-style-options-colorbox-colorbox' => [
        1,
      ],
    ],
  ];
  $form['colorbox']['colorboxHeight'] = [
    '#type' => 'textfield',
    '#title' => t('Height'),
    '#default_value' => $view->options['colorbox']['colorboxHeight'],
    '#dependency' => [
      'edit-style-options-colorbox-colorbox' => [
        1,
      ],
    ],
  ];
  $form['sameWindow']['#dependency'] = [
    'edit-style-options-colorbox-colorbox' => [
      0,
    ],
  ];
}