You are here

public function GroupContentEntityOperationAccessEvent::__construct in Organic groups 8

Constructs a GroupContentEntityOperationAccessEvent.

Parameters

string $operation: The entity operation, such as "create", "update" or "delete".

\Drupal\Core\Entity\ContentEntityInterface $group: The group in scope of which the access check is being performed.

\Drupal\Core\Entity\ContentEntityInterface $groupContent: The group content upon which the entity operation is performed.

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

Overrides AccessEventBase::__construct

File

src/Event/GroupContentEntityOperationAccessEvent.php, line 41

Class

GroupContentEntityOperationAccessEvent
Event that determines access to group content entity operations.

Namespace

Drupal\og\Event

Code

public function __construct(string $operation, ContentEntityInterface $group, ContentEntityInterface $groupContent, AccountInterface $user) {
  parent::__construct($group, $user);
  $this->operation = $operation;
  $this->groupContent = $groupContent;
}