public function uc_addresses_views_access::summary_title in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 views/uc_addresses_views_access.inc \uc_addresses_views_access::summary_title()
Implements views_plugin_access#summary_title().
File
- views/
uc_addresses_views_access.inc, line 17 - Contains uc_addresses_views_access class.
Class
- uc_addresses_views_access
- Access plugin that provides access control based on custom PHP code.
Code
public function summary_title() {
$title = array();
switch ($this->options['access_type']) {
case 'view':
$title[] = t('View access');
break;
case 'edit':
$title[] = t('Edit access');
break;
case 'delete':
$title[] = t('Delete access');
break;
}
if ($this->options['uid_argument'] && $this->options['aid_argument']) {
$title[] = t('by User ID and Address ID');
}
elseif ($this->options['uid_argument']) {
$title[] = t('by User ID');
}
elseif ($this->options['aid_argument']) {
$title[] = t('by Address ID');
}
else {
return t('Error! No arguments selected.');
}
return implode(', ', $title);
}