function views_handler_field_ctools_dropdown::render

Render the dropdown button.

Overrides views_handler_field::render

File

handlers/views_handler_field_ctools_dropdown.inc, line 45

Class

views_handler_field_ctools_dropdown
Field handler which displays some amount of links as ctools dropdown button.

Code

public function render($values) {
    static $added_admin_css;
    $links = $this->get_links();
    if (!empty($links)) {
        if (!empty($this->options['views_admin_css']) && !$added_admin_css) {
            views_include('admin');
            views_ui_add_admin_css();
            $added_admin_css = TRUE;
        }
        $vars = array(
            'links' => $links,
            'attributes' => array(
                'class' => array(
                    'links',
                    'inline',
                ),
            ),
        );
        return theme('links__ctools_dropbutton', $vars);
    }
    else {
        return '';
    }
}