You are here

public function RegistrationAccessEvent::__construct in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/Event/RegistrationAccessEvent.php \Drupal\rng\Event\RegistrationAccessEvent::__construct()

RegistrationAccessEvent constructor.

Parameters

string $entity_bundle: (optional) The bundle of the entity. Required if the entity supports bundles, defaults to NULL otherwise.

\Drupal\Core\Session\AccountInterface $account: (optional) The user session for which to check access, or NULL to check access for the current user. Defaults to NULL.

array $context: (optional) An array of key-value pairs to pass additional context when needed.

File

src/Event/RegistrationAccessEvent.php, line 54

Class

RegistrationAccessEvent
Registration event to influence access.

Namespace

Drupal\rng\Event

Code

public function __construct($entity_bundle = NULL, AccountInterface $account = NULL, array $context = []) {
  $this->entityBundle = $entity_bundle;
  $this->account = $account;
  $this->context = $context;
}