You are here

public function FullcalendarOptions::optionsList 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::optionsList()

@todo.

1 call to FullcalendarOptions::optionsList()
FullcalendarOptions::optionsListParsed in fullcalendar_options/src/Plugin/fullcalendar/type/FullcalendarOptions.php
@todo.

File

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

Class

FullcalendarOptions
@todo.

Namespace

Drupal\fullcalendar_options\Plugin\fullcalendar\type

Code

public function optionsList() {
  $form = [];
  $form['firstHour'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('First hour'),
    '#description' => $this
      ->t('Determines the first hour that will be visible in the scroll pane.'),
    '#size' => 2,
    '#maxlength' => 2,
    '#default_value' => 6,
    '#data_type' => 'int',
  ];
  $form['minTime'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Minimum time'),
    '#description' => $this
      ->t('Determines the first hour/time that will be displayed, even when the scrollbars have been scrolled all the way up.'),
    '#size' => 2,
    '#maxlength' => 2,
    '#default_value' => 0,
    '#data_type' => 'int',
  ];
  $form['maxTime'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Maximum time'),
    '#description' => $this
      ->t('Determines the last hour/time (exclusively) that will be displayed, even when the scrollbars have been scrolled all the way down.'),
    '#size' => 2,
    '#maxlength' => 2,
    '#default_value' => 24,
    '#data_type' => 'int',
  ];
  $form['slotMinutes'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Slot minutes'),
    '#description' => $this
      ->t('The frequency for displaying time slots, in minutes.'),
    '#size' => 2,
    '#maxlength' => 2,
    '#default_value' => 30,
    '#data_type' => 'int',
  ];
  $form['defaultEventMinutes'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Default event minutes'),
    '#description' => $this
      ->t('Determines the length (in minutes) an event appears to be when it has an unspecified end date.'),
    '#size' => 4,
    '#maxlength' => 4,
    '#default_value' => 120,
    '#data_type' => 'int',
  ];
  $form['allDaySlot'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('All day slot'),
    '#description' => $this
      ->t('Determines if the "all-day" slot is displayed at the top of the calendar.'),
    '#default_value' => TRUE,
    '#data_type' => 'bool',
  ];
  $form['weekends'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Weekends'),
    '#description' => $this
      ->t('Whether to include Saturday/Sunday columns in any of the calendar views.'),
    '#default_value' => TRUE,
    '#data_type' => 'bool',
  ];
  $form['lazyFetching'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Lazy fetching'),
    '#description' => $this
      ->t('Determines when event fetching should occur.'),
    '#default_value' => TRUE,
    '#data_type' => 'bool',
  ];
  $form['disableDragging'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Disable dragging'),
    '#description' => $this
      ->t('Disables all event dragging, even when events are editable.'),
    '#default_value' => FALSE,
    '#data_type' => 'bool',
  ];
  $form['disableResizing'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Disable resizing'),
    '#description' => $this
      ->t('Disables all event resizing, even when events are editable.'),
    '#default_value' => FALSE,
    '#data_type' => 'bool',
  ];
  $form['dragRevertDuration'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Drag revert duration'),
    '#description' => $this
      ->t('Time (in ms) it takes for an event to revert to its original position after an unsuccessful drag.'),
    '#size' => 6,
    '#maxlength' => 6,
    '#default_value' => 500,
    '#data_type' => 'int',
  ];
  $form['dayClick'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Day click'),
    '#description' => $this
      ->t('Switch the display when a day is clicked'),
    '#default_value' => FALSE,
    '#data_type' => 'bool',
  ];
  return $form;
}