You are here

public function simple_access_views_plugin_group::summary_title in Simple Access 7.2

Same name and namespace in other branches
  1. 6.2 views/simple_access_views_plugin_group.inc \simple_access_views_plugin_group::summary_title()

Return a string to display as the clickable title for the access control.

Overrides views_plugin_access::summary_title

File

views/simple_access_views_plugin_group.inc, line 29
Views access plugin to make use of cimple access.

Class

simple_access_views_plugin_group
@file Views access plugin to make use of cimple access.

Code

public function summary_title() {
  $count = count($this->options['groups']);
  if ($count < 1) {
    return t('No group(s) selected');
  }
  elseif ($count > 1) {
    return t('Multiple groups');
  }
  else {
    $gids = array_map(array(
      'simple_access_views_plugin_group',
      '_map_groups',
    ), simple_access_get_groups());
    $gid = array_shift($this->options['groups']);
    return $gids[$gid];
  }
}