function DevelGeneratePermissions::permissions

Same name and namespace in other branches
  1. 4.x devel_generate/src/DevelGeneratePermissions.php \Drupal\devel_generate\DevelGeneratePermissions::permissions()
  2. 5.x devel_generate/src/DevelGeneratePermissions.php \Drupal\devel_generate\DevelGeneratePermissions::permissions()
1 string reference to 'DevelGeneratePermissions::permissions'
devel_generate.permissions.yml in devel_generate/devel_generate.permissions.yml
devel_generate/devel_generate.permissions.yml

File

devel_generate/src/DevelGeneratePermissions.php, line 44

Class

DevelGeneratePermissions
Provides dynamic permissions of the filter module.

Namespace

Drupal\devel_generate

Code

function permissions() {
    $devel_generate_plugins = $this->develGeneratePluginManager
        ->getDefinitions();
    foreach ($devel_generate_plugins as $plugin) {
        $permission = $plugin['permission'];
        $permissions[$permission] = array(
            'title' => t($permission),
        );
    }
    //    $permissions = array(
    //      'administer devel_generate' => array(
    //        'title' => t('Administer devel generate'),
    //      ),
    //    );
    return $permissions;
}