You are here

function views_slideshow_plugin_style_slideshow::init in Views Slideshow 6.2

File

./views_slideshow_plugin_style_slideshow.inc, line 15
Contains the list style plugin.

Class

views_slideshow_plugin_style_slideshow
Style plugin to render each item in a slideshow of an ordered or unordered list.

Code

function init(&$view, &$display, $options = NULL) {

  // These are required for the view to continue to work.
  $this->view =& $view;
  $this->display =& $display;

  // Overlay incoming options on top of defaults
  $this
    ->unpack_options($this->options, isset($options) ? $options : $display->handler
    ->get_option('style_options'));
  if ($this
    ->uses_row_plugin() && $display->handler
    ->get_option('row_plugin')) {
    $this->row_plugin = $display->handler
      ->get_plugin('row');
  }

  // Eveything below here is what's needed for views slideshow.
  if (!empty($options['mode']) && in_array($options['mode'], array(
    'singleframe',
    'thumbnailhover',
    'menu',
    'slider',
    'ddblock',
  )) && is_array($options[$options['mode']])) {
    foreach ($options[$options['mode']] as $index => $value) {
      $this->options['views_slideshow_' . $options['mode']][$index] = $value;
    }
  }
}