You are here

public function GroupRouteContext::__construct in Group 8

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

Constructs a new GroupRouteContext.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $current_route_match: The current route match object.

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

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

File

src/Context/GroupRouteContext.php, line 33

Class

GroupRouteContext
Sets the current group as a context on group routes.

Namespace

Drupal\group\Context

Code

public function __construct(RouteMatchInterface $current_route_match, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation) {
  $this->currentRouteMatch = $current_route_match;
  $this->entityTypeManager = $entity_type_manager;
  $this->stringTranslation = $string_translation;
}