protected function TimelineJS::prepareTimelineOptions in Views TimelineJS integration 8.3
Processes timeline options before theming.
1 call to TimelineJS::prepareTimelineOptions()
- TimelineJS::render in src/
Plugin/ views/ style/ TimelineJS.php - Render the display in this style.
File
- src/
Plugin/ views/ style/ TimelineJS.php, line 786
Class
- TimelineJS
- Style plugin to render items as TimelineJS3 slides.
Namespace
Drupal\views_timelinejs\Plugin\views\styleCode
protected function prepareTimelineOptions() {
// Set the script_path option for locally-hosted libraries.
if ($this->configuration['library_location'] == 'local') {
$this
->prepareScriptPathOption();
}
// Set the language option to the site's default if it is empty and the
// language is supported.
if (empty($this->options['timeline_config']['language'])) {
$this
->prepareLanguageOption();
}
// If the custom start_at_current option is set, then set the timeline's
// start_at_slide option to the start_slide_index and override the
// start_at_end option.
if ($this->options['additional_config']['start_at_current']) {
$this->options['timeline_config']['start_at_slide'] = $this->startSlideIndex;
$this->options['timeline_config']['start_at_end'] = FALSE;
}
}