You are here

public function OptionsFormHelperTrait::getDefaultOptions in FullCalendar 8.5

Same name and namespace in other branches
  1. 8.2 src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php \Drupal\fullcalendar\Plugin\fullcalendar\type\OptionsFormHelperTrait::getDefaultOptions()
  2. 8.4 src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php \Drupal\fullcalendar\Plugin\fullcalendar\type\OptionsFormHelperTrait::getDefaultOptions()

Get all FC default options that are supported.

Return value

array Array of view options.

1 call to OptionsFormHelperTrait::getDefaultOptions()
FullCalendar::defineOptions in src/Plugin/fullcalendar/type/FullCalendar.php

File

src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php, line 18

Class

OptionsFormHelperTrait

Namespace

Drupal\fullcalendar\Plugin\fullcalendar\type

Code

public function getDefaultOptions() {
  return [
    'header' => [
      'default' => "left:'title', center:'', right:'today prev,next'",
    ],
    'footer' => [
      'default' => '',
    ],
    'titleFormat' => [
      'default' => '',
    ],
    'titleRangeSeparator' => [
      'default' => '\\u2013',
    ],
    'buttonText' => [
      'default' => "today:'today', month:'month', week:'week', day:'day', list:'list'",
    ],
    'buttonIcons' => [
      'default' => "prev:'left-single-arrow', next:'right-single-arrow', prevYear:'left-double-arrow', nextYear:'right-double-arrow'",
    ],
    'month_view' => [
      'default' => 1,
    ],
    'timegrid_view' => [
      'default' => 1,
    ],
    'list_view' => [
      'default' => 1,
    ],
    'daygrid_view' => [
      'default' => 1,
    ],
    'google' => [
      'contains' => [
        'googleCalendarApiKey' => [
          'default' => '',
        ],
        'googleCalendarId' => [
          'default' => '',
        ],
      ],
    ],
    'month_view_settings' => [
      'contains' => [
        'fixedWeekCount' => [
          'default' => 1,
        ],
        'showNonCurrentDates' => [
          'default' => 1,
        ],
      ],
    ],
    'timegrid_view_settings' => [
      'contains' => [
        'allDaySlot' => [
          'default' => 1,
        ],
        'allDayText' => [
          'default' => 'all-day',
        ],
        'slotEventOverlap' => [
          'default' => 1,
        ],
        'timeGridEventMinHeight' => [
          'default' => '',
        ],
      ],
    ],
    'list_view_settings' => [
      'contains' => [
        'listDayFormat' => [
          'default' => "weekday:'long'",
        ],
        'listDayAltFormat' => [
          'default' => "month:'long', day:'numeric', year:'numeric'",
        ],
        'noEventsMessage' => [
          'default' => 'No events to display',
        ],
      ],
    ],
    'display' => [
      'contains' => [
        'defaultView' => [
          'default' => 'dayGridMonth',
        ],
        'firstDay' => [
          'default' => 0,
        ],
      ],
    ],
    'times' => [
      'contains' => [
        'weekends' => [
          'default' => 1,
        ],
        'hiddenDays' => [
          'default' => '',
        ],
        'columnHeader' => [
          'default' => 1,
        ],
      ],
    ],
    'views_year' => [
      'contains' => [
        'listYear_buttonText' => [
          'default' => "buttonText: 'list'",
        ],
        'listYear_titleFormat' => [
          'default' => "year: 'numeric'",
        ],
      ],
    ],
    'views_month' => [
      'contains' => [
        'listMonth_buttonText' => [
          'default' => "buttonText: 'list'",
        ],
        'listMonth_titleFormat' => [
          'default' => "year: 'numeric', month: 'long'",
        ],
        'dayGridMonth_buttonText' => [
          'default' => "buttonText: 'month'",
        ],
        'dayGridMonth_titleFormat' => [
          'default' => "year: 'numeric', month: 'long'",
        ],
        'dayGridMonth_columnHeaderFormat' => [
          'default' => "weekday:'short'",
        ],
      ],
    ],
    'views_week' => [
      'contains' => [
        'listWeek_buttonText' => [
          'default' => "buttonText: 'list'",
        ],
        'listWeek_titleFormat' => [
          'default' => "year: 'numeric', month: 'short', day: 'numeric'",
        ],
        'dayGridWeek_buttonText' => [
          'default' => "buttonText: 'week'",
        ],
        'dayGridWeek_titleFormat' => [
          'default' => "year: 'numeric', month: 'short', day: 'numeric'",
        ],
        'dayGridWeek_columnHeaderFormat' => [
          'default' => "weekday:'short', month:'numeric', day:'numeric', omitCommas:true",
        ],
        'timeGridWeek_buttonText' => [
          'default' => "buttonText: 'week'",
        ],
        'timeGridWeek_titleFormat' => [
          'default' => "year: 'numeric', month: 'short', day: 'numeric'",
        ],
        'timeGridWeek_columnHeaderFormat' => [
          'default' => "weekday:'short', month:'numeric', day:'numeric', omitCommas:true",
        ],
      ],
    ],
    'views_day' => [
      'contains' => [
        'listDay_buttonText' => [
          'default' => "buttonText: 'list'",
        ],
        'listDay_titleFormat' => [
          'default' => "year: 'numeric', month: 'long', day: 'numeric'",
        ],
        'dayGridDay_buttonText' => [
          'default' => "buttonText: 'day'",
        ],
        'dayGridDay_titleFormat' => [
          'default' => "year: 'numeric', month: 'long', day: 'numeric'",
        ],
        'dayGridDay_columnHeaderFormat' => [
          'default' => "weekday:'long'",
        ],
        'timeGridDay_buttonText' => [
          'default' => "buttonText: 'day'",
        ],
        'timeGridDay_titleFormat' => [
          'default' => "year: 'numeric', month: 'long', day: 'numeric'",
        ],
        'timeGridDay_columnHeaderFormat' => [
          'default' => "weekday:'long'",
        ],
      ],
    ],
    'axis' => [
      'contains' => [
        'slotDuration' => [
          'default' => '',
        ],
        'slotLabelInterval' => [
          'default' => '',
        ],
        'slotLabelFormat' => [
          'default' => '',
        ],
        'minTime' => [
          'default' => '',
        ],
        'maxTime' => [
          'default' => '',
        ],
        'scrollTime' => [
          'default' => '',
        ],
      ],
    ],
    'nav' => [
      'contains' => [
        'defaultDate' => [
          'default' => '',
        ],
        'dateAlignment' => [
          'default' => '',
        ],
        'validRange' => [
          'default' => '',
        ],
      ],
    ],
    'links' => [
      'contains' => [
        'navLinks' => [
          'default' => 0,
        ],
        'navLinkDayClick' => [
          'default' => '',
        ],
        'navLinkWeekClick' => [
          'default' => '',
        ],
      ],
    ],
    'week' => [
      'contains' => [
        'weekNumbers' => [
          'default' => 0,
        ],
        'weekNumbersWithinDays' => [
          'default' => 0,
        ],
        'weekNumberCalculation' => [
          'default' => 'local',
        ],
        'weekLabel' => [
          'default' => 'W',
        ],
      ],
    ],
    'now' => [
      'contains' => [
        'nowIndicator' => [
          'default' => 0,
        ],
        'now' => [
          'default' => 0,
        ],
      ],
    ],
    'business' => [
      'contains' => [
        'businessHours' => [
          'default' => 0,
        ],
        'businessHours2' => [
          'default' => '',
        ],
      ],
    ],
    'style' => [
      'contains' => [
        'themeSystem' => [
          'default' => 'standard',
        ],
        'height' => [
          'default' => '',
        ],
        'contentHeight' => [
          'default' => '',
        ],
        'aspectRatio' => [
          'default' => '1.35',
        ],
        'handleWindowResize' => [
          'default' => 1,
        ],
        'windowResizeDelay' => [
          'default' => 100,
        ],
      ],
    ],
    'fields' => [
      'contains' => [
        'title' => [
          'default' => 0,
        ],
        'url' => [
          'default' => 0,
        ],
        'date' => [
          'default' => 0,
        ],
      ],
    ],
  ];
}