public function TimelineJS::defineOptions in Views TimelineJS integration 8.3
Information about options for all kinds of purposes will be held here.
'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),
Return value
array Returns the options of this handler/plugin.
Overrides StylePluginBase::defineOptions
File
- src/Plugin/ views/ style/ TimelineJS.php, line 87 
Class
- TimelineJS
- Style plugin to render items as TimelineJS3 slides.
Namespace
Drupal\views_timelinejs\Plugin\views\styleCode
public function defineOptions() {
  $options = parent::defineOptions();
  $options['timeline_config'] = [
    'contains' => [
      'width' => [
        'default' => '100%',
      ],
      'height' => [
        'default' => '40em',
      ],
      'hash_bookmark' => [
        'default' => FALSE,
      ],
      'scale_factor' => [
        'default' => 2,
      ],
      'timenav_position' => [
        'default' => 'bottom',
      ],
      'timenav_height' => [
        'default' => '',
      ],
      'timenav_height_percentage' => [
        'default' => '',
      ],
      'timenav_mobile_height_percentage' => [
        'default' => '',
      ],
      'timenav_height_min' => [
        'default' => '',
      ],
      'start_at_end' => [
        'default' => FALSE,
      ],
      'language' => [
        'default' => '',
      ],
    ],
  ];
  $options['additional_config'] = [
    'contains' => [
      'font' => [
        'default' => '',
      ],
      'start_at_current' => [
        'default' => FALSE,
      ],
    ],
  ];
  $options['timeline_fields'] = [
    'contains' => [
      'caption' => [
        'default' => '',
      ],
      'credit' => [
        'default' => '',
      ],
      'media' => [
        'default' => '',
      ],
      'thumbnail' => [
        'default' => '',
      ],
      'group' => [
        'default' => '',
      ],
      'start_date' => [
        'default' => '',
      ],
      'end_date' => [
        'default' => '',
      ],
      'display_date' => [
        'default' => '',
      ],
      'text' => [
        'default' => '',
      ],
      'headline' => [
        'default' => '',
      ],
      'background' => [
        'default' => '',
      ],
      'background_color' => [
        'default' => '',
      ],
      'type' => [
        'default' => '',
      ],
      'unique_id' => [
        'default' => '',
      ],
    ],
  ];
  return $options;
}