You are here

public function LoftDataGridsPermissions::permissions in Loft Data Grids 8

Return the permissions defined by this module.

Return value

array

1 string reference to 'LoftDataGridsPermissions::permissions'
loft_data_grids.permissions.yml in ./loft_data_grids.permissions.yml
loft_data_grids.permissions.yml

File

src/LoftDataGridsPermissions.php, line 23

Class

LoftDataGridsPermissions
Class LoftDataGridsPermissions

Namespace

Drupal\loft_data_grids

Code

public function permissions() {
  $perms = [];
  foreach (\Drupal::service('loft_data_grids.core')
    ->getExporters(false) as $exporter) {
    $perms['loft_data_grids:' . $exporter['id']] = [
      'title' => $this
        ->t('Visible in UI: @id', [
        '@id' => $exporter['name'],
      ]),
      'description' => Html::escape($exporter['description']),
    ];
  }
  return $perms;
}