function RequestPath::__construct

Same name and namespace in other branches
  1. 11.x core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::__construct()
  2. 10 core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::__construct()
  3. 9 core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::__construct()
  4. 8.9.x core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::__construct()

Constructs a RequestPath condition plugin.

Parameters

\Drupal\path_alias\AliasManagerInterface $aliasManager: An alias manager to find the alias for the current system path.

\Drupal\Core\Path\PathMatcherInterface $pathMatcher: The path matcher service.

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

\Drupal\Core\Path\CurrentPathStack $currentPath: The current path.

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

array $plugin_definition: The plugin implementation definition.

Overrides ConditionPluginBase::__construct

File

core/modules/system/src/Plugin/Condition/RequestPath.php, line 43

Class

RequestPath
Provides a 'Request Path' condition.

Namespace

Drupal\system\Plugin\Condition

Code

public function __construct(protected AliasManagerInterface $aliasManager, protected PathMatcherInterface $pathMatcher, protected RequestStack $requestStack, protected CurrentPathStack $currentPath, array $configuration, $plugin_id, array $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.