public function PathContext::__construct in Acquia Lift Connector 8.3
Same name and namespace in other branches
- 8.4 src/Service/Context/PathContext.php \Drupal\acquia_lift\Service\Context\PathContext::__construct()
- 8 src/Service/Context/PathContext.php \Drupal\acquia_lift\Service\Context\PathContext::__construct()
Constructor.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.
\Drupal\Core\Path\CurrentPathStack $current_path_stack: The current path service.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\acquia_lift\Service\Helper\PathMatcher $pathMatcher: The path matcher.
File
- src/
Service/ Context/ PathContext.php, line 72
Class
Namespace
Drupal\acquia_lift\Service\ContextCode
public function __construct(ConfigFactoryInterface $config_factory, CurrentPathStack $current_path_stack, RequestStack $request_stack, PathMatcher $pathMatcher) {
$this->settings = $config_factory
->get('acquia_lift.settings');
$this->credentialSettings = $this->settings
->get('credential');
$this->identitySettings = $this->settings
->get('identity');
$visibilitySettings = $this->settings
->get('visibility');
$this->requestPathPatterns = $visibilitySettings['path_patterns'];
$this->currentPath = $current_path_stack
->getPath();
$this->pathMatcher = $pathMatcher;
$this
->setContextIdentityByRequest($request_stack);
}