You are here

public function LogPermissions::logTypePermissions in Log entity 8

Returns an array of log type permissions.

Return value

array The log type permissions. @see \Drupal\user\PermissionHandlerInterface::getPermissions()

1 string reference to 'LogPermissions::logTypePermissions'
log.permissions.yml in ./log.permissions.yml
log.permissions.yml

File

src/LogPermissions.php, line 29
Contains \Drupal\log\LogPermissions.

Class

LogPermissions
Provides dynamic permissions for logs of different types.

Namespace

Drupal\log

Code

public function logTypePermissions() {
  $perms = array();

  // Generate log permissions for all log types.
  foreach (LogType::loadMultiple() as $type) {
    $perms += $this
      ->buildPermissions($type);
  }
  return $perms;
}