trait AuthorizationTrait

Authorization trait.

Properties

AuthorizerInterface $authorizer

Methods

authorize(string $action, object|string $entity, mixed ...$parameters)

Throws a ForbiddenException if the user is not allowed to perform the action on the entity.

Details

at line 26
protected authorize(string $action, object|string $entity, mixed ...$parameters)

Throws a ForbiddenException if the user is not allowed to perform the action on the entity.

Parameters

string $action Action
object|string $entity Entity instance or class name
mixed ...$parameters Additional parameters