Bristol SU Support Package
Public Member Functions | Private Attributes | List of all members
BristolSU\Support\Permissions\PermissionRepository Class Reference
Inheritance diagram for BristolSU\Support\Permissions\PermissionRepository:
Inheritance graph
[legend]
Collaboration diagram for BristolSU\Support\Permissions\PermissionRepository:
Collaboration graph
[legend]

Public Member Functions

 __construct (PermissionStoreContract $permissionStore)
 
 get (string $ability)
 
 forModule (string $alias)
 
 all ()
 

Private Attributes

 $permissionStore
 

Detailed Description

Handle getting permissions from the permission store

Definition at line 14 of file PermissionRepository.php.

Constructor & Destructor Documentation

◆ __construct()

BristolSU\Support\Permissions\PermissionRepository::__construct ( PermissionStoreContract  $permissionStore)
Parameters
PermissionStoreContract$permissionStorePermission store to retrieve permissions from

Definition at line 27 of file PermissionRepository.php.

References BristolSU\Support\Permissions\PermissionRepository\$permissionStore.

Member Function Documentation

◆ all()

BristolSU\Support\Permissions\PermissionRepository::all ( )

Get all permissions registered

Returns
Permission[]

Implements BristolSU\Support\Permissions\Contracts\PermissionRepository.

Definition at line 61 of file PermissionRepository.php.

◆ forModule()

BristolSU\Support\Permissions\PermissionRepository::forModule ( string  $alias)

Get all permissions for a given module alias

Parameters
string$aliasAlias of the module
Returns
Permission[]

Implements BristolSU\Support\Permissions\Contracts\PermissionRepository.

Definition at line 49 of file PermissionRepository.php.

References BristolSU\Support\Permissions\Contracts\Models\Permission\getModuleAlias().

◆ get()

BristolSU\Support\Permissions\PermissionRepository::get ( string  $ability)

Get a permission from the permission store

Parameters
string$abilityAbility of the permission
Returns
Permission

Implements BristolSU\Support\Permissions\Contracts\PermissionRepository.

Definition at line 38 of file PermissionRepository.php.

Member Data Documentation

◆ $permissionStore

BristolSU\Support\Permissions\PermissionRepository::$permissionStore
private

The documentation for this class was generated from the following file: