class RoleAccessCheck implements AccessInterface (View source)

Determines access to routes based on roles.

You can specify the '_role' key on route requirements. If you specify a single role, users with that role with have access. If you specify multiple ones you can conjunct them with AND by using a "," and with OR by using "+".

Methods

access(Route $route, AccountInterface $account)

Checks access.

Details

AccessResultInterface access(Route $route, AccountInterface $account)

Checks access.

Parameters

Route $route

The route to check against.

AccountInterface $account

The currently logged in account.

Return Value

AccessResultInterface

The access result.