public function ThunderTaxonomyPermissions::permissions in Thunder 8.5
Same name and namespace in other branches
- 8.2 modules/thunder_taxonomy/src/ThunderTaxonomyPermissions.php \Drupal\thunder_taxonomy\ThunderTaxonomyPermissions::permissions()
- 8.3 modules/thunder_taxonomy/src/ThunderTaxonomyPermissions.php \Drupal\thunder_taxonomy\ThunderTaxonomyPermissions::permissions()
- 8.4 modules/thunder_taxonomy/src/ThunderTaxonomyPermissions.php \Drupal\thunder_taxonomy\ThunderTaxonomyPermissions::permissions()
- 6.2.x modules/thunder_taxonomy/src/ThunderTaxonomyPermissions.php \Drupal\thunder_taxonomy\ThunderTaxonomyPermissions::permissions()
- 6.0.x modules/thunder_taxonomy/src/ThunderTaxonomyPermissions.php \Drupal\thunder_taxonomy\ThunderTaxonomyPermissions::permissions()
- 6.1.x modules/thunder_taxonomy/src/ThunderTaxonomyPermissions.php \Drupal\thunder_taxonomy\ThunderTaxonomyPermissions::permissions()
Get taxonomy permissions.
Return value
array Permissions array.
1 string reference to 'ThunderTaxonomyPermissions::permissions'
- thunder_taxonomy.permissions.yml in modules/
thunder_taxonomy/ thunder_taxonomy.permissions.yml - modules/thunder_taxonomy/thunder_taxonomy.permissions.yml
File
- modules/
thunder_taxonomy/ src/ ThunderTaxonomyPermissions.php, line 49
Class
- ThunderTaxonomyPermissions
- Provides dynamic permissions of the taxonomy module.
Namespace
Drupal\thunder_taxonomyCode
public function permissions() {
$permissions = [];
foreach ($this->entityTypeManager
->getStorage('taxonomy_vocabulary')
->loadMultiple() as $vocabulary) {
$permissions += [
'view published terms in ' . $vocabulary
->id() => [
'title' => $this
->t('View published terms in %vocabulary', [
'%vocabulary' => $vocabulary
->label(),
]),
],
'view unpublished terms in ' . $vocabulary
->id() => [
'title' => $this
->t('View unpublished terms in %vocabulary', [
'%vocabulary' => $vocabulary
->label(),
]),
],
];
}
return $permissions;
}