domain_node_access_explain

Definition

domain_node_access_explain($row)
domain.module, line 1393

Description

Implements hook_node_access_explain for devel.module

Code

function domain_node_access_explain($row) {
  global $_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.', array('%domain' => $domain['subdomain']));
      break;
    case 'domain_editor':
      $return .= t('Editable by %domain editors.', array('%domain' => $domain['subdomain']));
      break;
  }
  return $return;
}