class ContactPageAccess implements AccessInterface (View source)

Access check for contact_personal_page route.

Properties

protected ConfigFactoryInterface $configFactory

The contact settings config object.

protected UserDataInterface $userData

The user data service.

Methods

__construct(ConfigFactoryInterface $config_factory, UserDataInterface $user_data)

Constructs a ContactPageAccess instance.

access(UserInterface $user, AccountInterface $account)

Checks access to the given user's contact page.

Details

__construct(ConfigFactoryInterface $config_factory, UserDataInterface $user_data)

Constructs a ContactPageAccess instance.

Parameters

ConfigFactoryInterface $config_factory

The config factory.

UserDataInterface $user_data

The user data service.

AccessResultInterface access(UserInterface $user, AccountInterface $account)

Checks access to the given user's contact page.

Parameters

UserInterface $user

The user being contacted.

AccountInterface $account

The currently logged in account.

Return Value

AccessResultInterface

The access result.