protected function FullCalendar::prepareSettings in FullCalendar 8.2
Same name and namespace in other branches
- 8.5 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::prepareSettings()
- 8 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::prepareSettings()
- 8.3 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::prepareSettings()
- 8.4 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::prepareSettings()
Prepare JavaScript settings.
Throws
\Exception
2 calls to FullCalendar::prepareSettings()
- FullCalendar::prepareAttached in src/
Plugin/ views/ style/ FullCalendar.php - Load libraries.
- FullCalendar::validate in src/
Plugin/ views/ style/ FullCalendar.php - Validate that the plugin is correct and can be saved.
File
- src/
Plugin/ views/ style/ FullCalendar.php, line 264
Class
- FullCalendar
- Plugin annotation @ViewsStyle( id = "fullcalendar", title = @Translation("FullCalendar"), help = @Translation("Displays items on a calendar."), theme = "views_view--fullcalendar", display_types = {"normal"} )
Namespace
Drupal\fullcalendar\Plugin\views\styleCode
protected function prepareSettings() {
$settings =& drupal_static(__METHOD__, []);
if (empty($settings)) {
/* @var \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar $plugin */
foreach ($this
->getPlugins() as $plugin_id => $plugin) {
$plugin
->process($settings);
}
}
// Google Calendar events.
if (!empty($settings['options']['googleCalendarApiKey'])) {
$ids = array_map('trim', explode(',', trim($settings['googleCalendarId'])));
foreach ($ids as $id) {
$settings['options']['eventSources'][] = [
'googleCalendarId' => $id,
'className' => 'fc-event-default',
];
}
}
// Drupal events.
$events = $this
->prepareEvents();
if ($events) {
$settings['options']['eventSources'][] = $events;
}
return $settings;
}