Represents the current path for the current request.
Note: You should not rely on paths but rather on route names / parameters or other indicators like context. For some fundamental parts, like routing or path processing, there is unfortunately no way around dealing with paths.
Hierarchy
- class \Drupal\Core\Path\CurrentPathStack
File
- core/lib/Drupal/Core/Path/CurrentPathStack.php, line 13
Namespace
Drupal\Core\Path
Members
Name | Modifiers | Type | Description |
---|---|---|---|
CurrentPathStack::$paths | protected | property | Static cache of paths. |
CurrentPathStack::$requestStack | protected | property | The request stack. |
CurrentPathStack::getPath | public | function | Returns the path of the current request. |
CurrentPathStack::setPath | public | function | Sets the current path. |
CurrentPathStack::__construct | public | function | Constructs a new CurrentPathStack instance. |
Please login to continue.