You are here

public function AddPaymentMethodConfiguration::access in Payment 8.2

Checks access to the route.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 string reference to 'AddPaymentMethodConfiguration::access'
payment.routing.yml in ./payment.routing.yml
payment.routing.yml

File

src/Controller/AddPaymentMethodConfiguration.php, line 96

Class

AddPaymentMethodConfiguration
Handles the "add payment method configuration" route.

Namespace

Drupal\payment\Controller

Code

public function access() {
  $plugin_id = $this->requestStack
    ->getCurrentRequest()->attributes
    ->get('plugin_id');
  return $this->entityTypeManager
    ->getAccessControlHandler('payment_method_configuration')
    ->createAccess($plugin_id, $this->currentUser, [], TRUE);
}