You are here

function _taxonomy_access_grant_field_label in Taxonomy Access Control 7

Returns the proper invisible field label for each grant table element.

1 call to _taxonomy_access_grant_field_label()
taxonomy_access_admin_build_row in ./taxonomy_access.admin.inc
Assembles a row of grant options for a term or default on the admin form.

File

./taxonomy_access.admin.inc, line 563
Administrative interface for taxonomy access control.

Code

function _taxonomy_access_grant_field_label($grant, $for = NULL) {
  if ($for) {
    $label = array(
      '@label',
      $for,
    );
    $titles = array(
      'view' => t('View grant for @label', $label),
      'update' => t('Update grant for @label', $label),
      'delete' => t('Delete grant for @label', $label),
      'create' => t('Add tag grant for @label', $label),
      'list' => t('View tag grant for @label', $label),
    );
  }
  else {
    $titles = array(
      'view' => t('View grant'),
      'update' => t('Update grant'),
      'delete' => t('Delete grant'),
      'create' => t('Add tag grant'),
      'list' => t('View tag grant'),
    );
  }
  return $titles[$grant];
}