EnforcesPermissionPartition
trait EnforcesPermissionPartition
Properties
| protected PermissionRegistrar | $permissionPartitionRegistrar | ||
| protected PermissionRelationContext | $permissionRelationContext |
Methods
Initialize the permission partition relation state.
Get the relation's captured permission context.
Get the connection that owns permission pivots.
Format an attachment record without allowing partition overrides.
Update an existing pivot without allowing partition movement.
Detach pivot records within the captured permission context.
Get and mark lazily loaded relation results.
Initialize and mark eager-loaded relation collections.
Match and mark eager-loaded relation collections.
Reject conflicting caller-supplied partition attributes.
Mark the loaded collection attached to each eager-loaded model.
Details
at line 24
protected void
initializePermissionPartitionRelation(PermissionRegistrar $registrar, PermissionRelationContext $context)
Initialize the permission partition relation state.
at line 35
PermissionRelationContext
getPermissionRelationContext()
Get the relation's captured permission context.
at line 43
protected ConnectionInterface
getPivotConnection()
Get the connection that owns permission pivots.
at line 51
protected array
formatAttachRecord(int|string $key, mixed $value, array $attributes, bool $hasTimestamps)
Format an attachment record without allowing partition overrides.
at line 76
int
updateExistingPivot(mixed $id, array $attributes, bool $touch = true)
Update an existing pivot without allowing partition movement.
at line 94
int
detach(mixed $ids = null, bool $touch = true)
Detach pivot records within the captured permission context.
at line 104
Collection
getResults()
Get and mark lazily loaded relation results.
at line 126
array
initRelation(array $models, string $relation)
Initialize and mark eager-loaded relation collections.
at line 140
array
match(array $models, Collection $results, string $relation)
Match and mark eager-loaded relation collections.
at line 151
protected void
ensurePivotMatchesPermissionPartition(array $attributes)
Reject conflicting caller-supplied partition attributes.
at line 180
protected void
markPermissionRelationCollections(array $models, string $relation)
Mark the loaded collection attached to each eager-loaded model.