You are here

public function EntityQueryAlter::__construct in Group 8

Same name and namespace in other branches
  1. 2.0.x src/QueryAccess/EntityQueryAlter.php \Drupal\group\QueryAccess\EntityQueryAlter::__construct()

Constructs a new EntityQueryAlter object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\group\Plugin\GroupContentEnablerManagerInterface $plugin_manager: The group content enabler plugin manager.

\Drupal\group\Access\ChainGroupPermissionCalculatorInterface $permission_calculator: The group permission calculator.

\Drupal\Core\Database\Connection $database: The database connection.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

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

File

src/QueryAccess/EntityQueryAlter.php, line 115

Class

EntityQueryAlter
Defines a class for altering entity queries.

Namespace

Drupal\group\QueryAccess

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, GroupContentEnablerManagerInterface $plugin_manager, ChainGroupPermissionCalculatorInterface $permission_calculator, Connection $database, RendererInterface $renderer, RequestStack $request_stack, AccountInterface $current_user) {
  $this->entityTypeManager = $entity_type_manager;
  $this->pluginManager = $plugin_manager;
  $this->permissionCalculator = $permission_calculator;
  $this->database = $database;
  $this->renderer = $renderer;
  $this->requestStack = $request_stack;
  $this->currentUser = $current_user;
  $this->cacheableMetadata = new CacheableMetadata();
}