1 taxonomy.module taxonomy_vocabulary_list_permissions($vocabulary)

Helper function to generate standard permission list for a vocabulary.

Parameters

$vocabulary: Fully loaded TaxonomyVocabulary object.

Return value

array: An array of permission names and descriptions.

File

core/modules/taxonomy/taxonomy.module, line 66
Enables the organization of content into categories.

Code

function taxonomy_vocabulary_list_permissions($vocabulary) {
  $permissions = array(
    'edit terms in ' . $vocabulary->machine_name => array(
      'title' => t('%vocabulary: Edit terms', array('%vocabulary' => $vocabulary->name)),
    ),
    'delete terms in ' . $vocabulary->machine_name => array(
      'title' => t('%vocabulary: Delete terms', array('%vocabulary' => $vocabulary->name)),
    ),
  );

  return $permissions;
}