function taxonomy_access_fix_permissions in Taxonomy access fix 8
Permission callback for TAF's MODULE.permissions.yml.
See also
taxonomy_access_fix.permissions.yml
1 string reference to 'taxonomy_access_fix_permissions'
File
- ./
taxonomy_access_fix.module, line 65
Code
function taxonomy_access_fix_permissions() {
$vocabularies = Vocabulary::loadMultiple();
$permissions = [];
foreach ($vocabularies as $vocabulary) {
$permissions['add terms in ' . $vocabulary
->id()] = [
'title' => t('Add terms in %vocabulary', [
'%vocabulary' => $vocabulary
->label(),
]),
];
$permissions['reorder terms in ' . $vocabulary
->id()] = [
'title' => t('Reorder terms in %vocabulary', [
'%vocabulary' => $vocabulary
->label(),
]),
];
}
return $permissions;
}