trait BundlePermissionHandlerTrait (View source)

Provides a method to simplify generating bundle level permissions.

Methods

array
generatePermissions(array $bundles, callable $permission_builder)

Builds a permissions array for the supplied bundles.

Details

protected array generatePermissions(array $bundles, callable $permission_builder)

Builds a permissions array for the supplied bundles.

Parameters

array $bundles

An array of bundles to generate permissions for.

callable $permission_builder

A callable to generate the permissions for a particular bundle. Returns an array of permissions. See PermissionHandlerInterface::getPermissions() for the array structure.

Return Value

array

Permissions array. See PermissionHandlerInterface::getPermissions() for the array structure.

See also

PermissionHandlerInterface::getPermissions