You are here

public function UserRouteContext::__construct in Open Social 8.3

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  2. 8 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  3. 8.2 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  4. 8.4 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  5. 8.5 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  6. 8.6 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  7. 8.7 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  8. 8.8 modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  9. 10.3.x modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  10. 10.0.x modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  11. 10.1.x modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()
  12. 10.2.x modules/social_features/social_user/src/ContextProvider/UserRouteContext.php \Drupal\social_user\ContextProvider\UserRouteContext::__construct()

Constructs a new UserRouteContext.

Parameters

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

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

File

modules/social_features/social_user/src/ContextProvider/UserRouteContext.php, line 45

Class

UserRouteContext
Class UserRouteContext.

Namespace

Drupal\social_user\ContextProvider

Code

public function __construct(RouteMatchInterface $current_route_match, EntityTypeManagerInterface $entity_type_manager) {
  $this->currentRouteMatch = $current_route_match;
  $this->userStorage = $entity_type_manager
    ->getStorage('user');
}