Views Slideshow: Controls.

Paramètres

array $vars: Theme variables.

Return value

string The html string for the control widget.

Sujets associés

Fichier

theme/views_slideshow.theme.inc, line 358

Code

function theme_views_slideshow_controls_widget_render($vars) {
    // Add JavaScript settings for the controls type.
    $js_vars = array(
        'viewsSlideshowControls' => array(
            $vars['vss_id'] => array(
                $vars['location'] => array(
                    'type' => views_slideshow_format_addons_name($vars['settings']['type']),
                ),
            ),
        ),
    );
    drupal_add_library('views_slideshow', 'views_slideshow');
    drupal_add_js($js_vars, 'setting');
    $items_per_slide = isset($vars['view']->style_options['views_slideshow_cycle']['items_per_slide']) ? $vars['view']->style_options['views_slideshow_cycle']['items_per_slide'] : null;
    $output = '';
    if (empty($vars['settings']['hide_on_single_slide']) || count($vars['rows']) > $items_per_slide) {
        $output = theme(views_theme_functions($vars['settings']['type'], $vars['view'], $vars['view']->display[$vars['view']->current_display]), array(
            'vss_id' => $vars['vss_id'],
            'view' => $vars['view'],
            'settings' => $vars['settings'],
            'location' => $vars['location'],
            'rows' => $vars['rows'],
        ));
    }
    return $output;
}