public function ConfigPagesPermissions::permissions in Config Pages 8.2
Same name and namespace in other branches
- 8.3 src/ConfigPagesPermissions.php \Drupal\config_pages\ConfigPagesPermissions::permissions()
Returns an array of Config pages permissions.
Return value
array Permissions.
1 string reference to 'ConfigPagesPermissions::permissions'
File
- src/
ConfigPagesPermissions.php, line 49
Class
- ConfigPagesPermissions
- Provides rest module permissions.
Namespace
Drupal\config_pagesCode
public function permissions() {
$permissions = [];
$config_pages = $this->storage
->loadMultiple();
foreach ($config_pages as $config_page) {
$permissions['view ' . $config_page
->id() . ' config page entity'] = [
'title' => $this
->t('View the @label config page entity', [
'@label' => $config_page
->label(),
]),
];
$permissions['edit ' . $config_page
->id() . ' config page entity'] = [
'title' => $this
->t('Edit the @label config page entity', [
'@label' => $config_page
->label(),
]),
];
}
return $permissions;
}