function domain_node_access_explain in Domain Access 7.2
Same name and namespace in other branches
- 5 domain.module \domain_node_access_explain()
- 6.2 domain.module \domain_node_access_explain()
- 7.3 domain.module \domain_node_access_explain()
Implements hook_node_access_explain for devel.module
File
- ./
domain.module, line 2815 - Core module functions for the Domain Access suite.
Code
function domain_node_access_explain($row) {
$_domain = domain_get_domain();
$active = $_domain['subdomain'];
$domain = domain_lookup($row->gid);
$return = t('Domain Access') . ' -- ';
switch ($row->realm) {
case 'domain_all':
if (domain_grant_all() == TRUE) {
$return .= t('True: Allows content from all domains to be shown.');
}
else {
$return .= t('False: Only allows content from the active domain (%domain) or from all affiliates.', array(
'%domain' => $active,
));
}
break;
case 'domain_site':
$return .= t('Viewable on all affiliate sites.');
break;
case 'domain_id':
$return .= t('Viewable on %domain<br />%domain privileged editors may edit and delete', array(
'%domain' => $domain['subdomain'],
));
break;
default:
// This is not our grant, do not return anything.
$return = NULL;
break;
}
return $return;
}