You are here

public function PaymentReference::resumeContextAccess in Payment 8.2

Checks if the payment type context can be resumed.

Parameters

\Drupal\Core\Session\AccountInterface $account:

Return value

\Drupal\Core\Access\AccessResultInterface

Overrides PaymentTypeInterface::resumeContextAccess

See also

self::getResumeContextResponse

File

modules/payment_reference/src/Plugin/Payment/Type/PaymentReference.php, line 113

Class

PaymentReference
The payment reference field payment type.

Namespace

Drupal\payment_reference\Plugin\Payment\Type

Code

public function resumeContextAccess(AccountInterface $account) {
  return AccessResult::allowedIf($this
    ->getPayment()
    ->getOwnerId() == $account
    ->id());
}