You are here

public function MultipleRegistrationController::access in Multiple Registration 8

Same name and namespace in other branches
  1. 8.2 src/Controller/MultipleRegistrationController.php \Drupal\multiple_registration\Controller\MultipleRegistrationController::access()
  2. 3.x src/Controller/MultipleRegistrationController.php \Drupal\multiple_registration\Controller\MultipleRegistrationController::access()

Checks access for register page.

Parameters

\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.

Return value

\Drupal\Core\Access\AccessResult Returns access result.

1 string reference to 'MultipleRegistrationController::access'
multiple_registration.routing.yml in ./multiple_registration.routing.yml
multiple_registration.routing.yml

File

src/Controller/MultipleRegistrationController.php, line 76

Class

MultipleRegistrationController
Class MultipleRegistrationController.

Namespace

Drupal\multiple_registration\Controller

Code

public function access(AccountInterface $account) {
  $registerAccessCheck = new RegisterAccessCheck();
  return AccessResult::allowedIf($account
    ->hasPermission('administer multiple_registration') || $registerAccessCheck
    ->access($account)
    ->isAllowed());
}