You are here

public function EventOnlyQueryAccessHandler::__construct in Entity API 8

Constructs a new EventOnlyQueryAccessHandler object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

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

File

src/QueryAccess/EventOnlyQueryAccessHandler.php, line 51

Class

EventOnlyQueryAccessHandler
Generic query access handler for entity types that do not have one.

Namespace

Drupal\entity\QueryAccess

Code

public function __construct(EntityTypeInterface $entity_type, EventDispatcherInterface $event_dispatcher, AccountInterface $current_user) {
  $this->entityType = $entity_type;
  $this->eventDispatcher = $event_dispatcher;
  $this->currentUser = $current_user;
}