AccessDeniedSubscriber::__construct

public AccessDeniedSubscriber::__construct(AccountInterface $account, UrlGeneratorInterface $url_generator)

Constructs a new redirect subscriber.

Parameters

\Drupal\Core\Session\AccountInterface $account: The current user.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.

File

core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php, line 41

Class

AccessDeniedSubscriber
Redirects users when access is denied.

Namespace

Drupal\user\EventSubscriber

Code

public function __construct(AccountInterface $account, UrlGeneratorInterface $url_generator) {
  $this->account = $account;
  $this->setUrlGenerator($url_generator);
}
doc_Drupal
2016-10-29 08:42:24
Comments
Leave a Comment

Please login to continue.