function views_plugin_access_role::summary_title

Overrides views_plugin_access::summary_title

File

plugins/views_plugin_access_role.inc, line 32

Class

views_plugin_access_role
Access plugin that provides role-based access control.

Code

public function summary_title() {
    $count = count($this->options['role']);
    if ($count < 1) {
        return t('No role(s) selected');
    }
    elseif ($count > 1) {
        return t('Multiple roles');
    }
    else {
        $rids = views_ui_get_roles();
        $rid = reset($this->options['role']);
        return check_plain($rids[$rid]);
    }
}