public function UsersExportPermissions::permissions in Users Export 8
Return the permissions defined by this module.
Return value
array Return perms
1 string reference to 'UsersExportPermissions::permissions'
File
- src/
UsersExportPermissions.php, line 21
Class
- UsersExportPermissions
- User Export Permissions Class.
Namespace
Drupal\users_exportCode
public function permissions() {
$perms = [];
if (\Drupal::moduleHandler()
->moduleExists('loft_data_grids')) {
foreach (\Drupal::service('loft_data_grids.core')
->getExporters(FALSE) as $info) {
$perms['users_export:export as ' . $info['id']] = [
'title' => $this
->t('Export as @name', [
'@name' => $info['name'],
]),
'description' => Html::escape($info['description']),
];
}
}
return $perms;
}