public function FullCalendar::filterSettings in FullCalendar 8.2
Same name and namespace in other branches
- 8.5 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::filterSettings()
- 8.4 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::filterSettings()
Check for differences in default settings for this view.
Parameters
array $settings: Array of view settings.
Return value
array Settings that are different from the defaults.
1 call to FullCalendar::filterSettings()
- FullCalendar::preView in src/
Plugin/ fullcalendar/ type/ FullCalendar.php
File
- src/
Plugin/ fullcalendar/ type/ FullCalendar.php, line 1082
Class
- FullCalendar
- Plugin annotation @FullcalendarOption( id = "fullcalendar", module = "fullcalendar", js = TRUE, weight = "-20" )
Namespace
Drupal\fullcalendar\Plugin\fullcalendar\typeCode
public function filterSettings(array $settings) {
// Prepare default options - move 'default' and 'contains' keys a level up.
$defaults = [];
$_defaults = $this
->defineOptions();
foreach ($_defaults as $key => $value) {
if (isset($value['default'])) {
$defaults[$key] = $value['default'];
}
elseif (isset($value['contains'])) {
foreach ($value['contains'] as $key1 => $value1) {
$defaults[$key][$key1] = $value1['default'];
}
}
}
// Diff current settings against default.
return $this
->arrayRecursiveDiff($settings, $defaults);
}