Bristol SU Support Package
|
Public Member Functions | |
moduleInstance () | |
scopeUser (Builder $query, ?int $userId=null, ?string $ability=null, ?int $moduleInstanceId=null) | |
scopeLogic (Builder $query, ?int $logicId=null, ?string $ability=null, ?int $moduleInstanceId=null) | |
scopeGroup (Builder $query, ?int $groupId=null, ?string $ability=null, ?int $moduleInstanceId=null) | |
scopeRole (Builder $query, ?int $roleId=null, ?string $ability=null, ?int $moduleInstanceId=null) | |
![]() | |
initializeHasRevisions () | |
getSystemUserId () | |
Protected Attributes | |
$table = 'model_permissions' | |
$fillable | |
$casts | |
![]() | |
$historyLimit | |
$revisionCleanup | |
Represents a permission assigned to a model.
static Builder user(?int $userId = null, ?string $ability = null, ?int $moduleInstanceId = null) Get all permissions assigned to the user with the given parameters static Builder group(?int $groupId = null, ?string $ability = null, ?int $moduleInstanceId = null) Get all permissions assigned to the group with the given parameters static Builder role(?int $roleId = null, ?string $ability = null, ?int $moduleInstanceId = null) Get all permissions assigned to the role with the given parameters static Builder logic(?int $logicId = null, ?string $ability = null, ?int $moduleInstanceId = null) Get all permissions assigned to the logic group with the given parameters
Definition at line 18 of file ModelPermission.php.
BristolSU\Support\Permissions\Models\ModelPermission::moduleInstance | ( | ) |
The related module instance
If the model permission belongs to a module instance, it is a module permission.
Definition at line 57 of file ModelPermission.php.
BristolSU\Support\Permissions\Models\ModelPermission::scopeGroup | ( | Builder | $query, |
?int | $groupId = null , |
||
?string | $ability = null , |
||
?int | $moduleInstanceId = null |
||
) |
Get model permissions for a group with the given attributes.
Builder | $query | Query object to mutate |
int | null | $groupId | Group ID to return model permissions for. Leave null to return all Group IDs. |
string | null | $ability | Ability the model permissions should have. Leave null to return all abilities. |
int | null | $moduleInstanceId | The module instance the model permission should have. Leave null to return all module instances. |
Definition at line 119 of file ModelPermission.php.
BristolSU\Support\Permissions\Models\ModelPermission::scopeLogic | ( | Builder | $query, |
?int | $logicId = null , |
||
?string | $ability = null , |
||
?int | $moduleInstanceId = null |
||
) |
Get model permissions for a logic group with the given attributes
Builder | $query | Query object to mutate |
int | null | $logicId | Logic ID to return model permissions for. Leave null to return all Logic IDs. |
string | null | $ability | Ability the model permissions should have. Leave null to return all abilities. |
int | null | $moduleInstanceId | The module instance the model permission should have. Leave null to return all module instances. |
Definition at line 95 of file ModelPermission.php.
BristolSU\Support\Permissions\Models\ModelPermission::scopeRole | ( | Builder | $query, |
?int | $roleId = null , |
||
?string | $ability = null , |
||
?int | $moduleInstanceId = null |
||
) |
Get model permissions for a role with the given attributes.
Builder | $query | Query object to mutate |
int | null | $roleId | Role ID to return model permissions for. Leave null to return all Role IDs. |
string | null | $ability | Ability the model permissions should have. Leave null to return all abilities. |
int | null | $moduleInstanceId | The module instance the model permission should have. Leave null to return all module instances. |
Definition at line 143 of file ModelPermission.php.
BristolSU\Support\Permissions\Models\ModelPermission::scopeUser | ( | Builder | $query, |
?int | $userId = null , |
||
?string | $ability = null , |
||
?int | $moduleInstanceId = null |
||
) |
Get model permissions for a user with the given attributes.
Builder | $query | Query object to mutate |
int | null | $userId | User ID to return model permissions for. Leave null to return all User IDs. |
string | null | $ability | Ability the model permissions should have. Leave null to return all abilities. |
int | null | $moduleInstanceId | The module instance the model permission should have. Leave null to return all module instances. |
Definition at line 71 of file ModelPermission.php.
|
protected |
Definition at line 46 of file ModelPermission.php.
|
protected |
Definition at line 33 of file ModelPermission.php.
|
protected |
Definition at line 26 of file ModelPermission.php.