You are here

public function AccessEventBase::__construct in Organic groups 8

Constructs an AccessEventBase event.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $group: The group that provides the context in which to perform the access check.

\Drupal\Core\Session\AccountInterface $user: The user for which to check access.

1 call to AccessEventBase::__construct()
GroupContentEntityOperationAccessEvent::__construct in src/Event/GroupContentEntityOperationAccessEvent.php
Constructs a GroupContentEntityOperationAccessEvent.
1 method overrides AccessEventBase::__construct()
GroupContentEntityOperationAccessEvent::__construct in src/Event/GroupContentEntityOperationAccessEvent.php
Constructs a GroupContentEntityOperationAccessEvent.

File

src/Event/AccessEventBase.php, line 51

Class

AccessEventBase
Base class for OG access events.

Namespace

Drupal\og\Event

Code

public function __construct(ContentEntityInterface $group, AccountInterface $user) {
  $this->group = $group;
  $this->user = $user;
  $this->access = AccessResult::neutral();
}