trait AuthorizableTrait

Authorizable trait.

Properties

protected AuthorizerInterface $authorizer Authorizer.

Methods

setAuthorizer(AuthorizerInterface $authorizer)

Sets the authorizer.

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

Returns TRUE if allowed to perform the action on the entity and FALSE if not.

Details

at line 29
setAuthorizer(AuthorizerInterface $authorizer)

Sets the authorizer.

Parameters

AuthorizerInterface $authorizer Authorizer

at line 42
bool can(string $action, object|string $entity, mixed ...$parameters)

Returns TRUE if allowed to perform the action on the entity and FALSE if not.

Parameters

string $action Action
object|string $entity Entity
mixed ...$parameters Additional parameters

Return Value

bool