You are here

public function MediaBulkConfigPermissions::mediaBulkConfigPermissions in Media Bulk Upload 8

Returns an array of node type permissions.

Return value

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

1 string reference to 'MediaBulkConfigPermissions::mediaBulkConfigPermissions'
media_bulk_upload.permissions.yml in ./media_bulk_upload.permissions.yml
media_bulk_upload.permissions.yml

File

src/MediaBulkConfigPermissions.php, line 21

Class

MediaBulkConfigPermissions
Provides dynamic permissions for nodes of different types.

Namespace

Drupal\media_bulk_upload

Code

public function mediaBulkConfigPermissions() {
  $perms = [];

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