modules/acm_checkout/src/Controller/CheckoutController.php
public function checkAccess(AccountInterface $account) {
    $cart = $this->cartStorage;

    if (empty($cart) || $cart->isEmpty()) {
      return AccessResult::forbidden('Invalid cart');
    }

    return AccessResult::allowedIfHasPermission($account, 'access checkout');
  }
public function checkAccess(AccountInterface $account) {
    $cart = $this->cartStorage;

    if (empty($cart) || $cart->isEmpty()) {
      return AccessResult::forbidden('Invalid cart');
    }

    return AccessResult::allowedIfHasPermission($account, 'access checkout');
  }
public function checkAccess ( AccountInterface $ account ) { $ cart = $ this -> cartStorage ; if ( empty ( $ cart ) || $ cart -> isEmpty ( ) ) { return AccessResult :: forbidden ( 'Invalid cart' ) ; } return AccessResult :: allowedIfHasPermission ( $ account , 'access checkout' ) ; }
Checks access for the form page.

@param \Drupal\Core\Session\AccountInterface $account
The current user account.

@return \Drupal\Core\Access\AccessResult
The access result.
Checks access for the form page .