public function LanguageAccessPermissions::permissions in Language access 8
Returns an array of language access permissions.
Return value
array Permissions.
1 string reference to 'LanguageAccessPermissions::permissions'
File
- src/
LanguageAccessPermissions.php, line 45
Class
- LanguageAccessPermissions
- Provides language module permissions.
Namespace
Drupal\language_accessCode
public function permissions() {
$permissions = [];
$languages = $this->languageManager
->getLanguages();
foreach ($languages as $language) {
$permissions['access language ' . $language
->getId()] = [
'title' => t('Access language @language', [
'@language' => $language
->getName(),
]),
];
}
return $permissions;
}