On this page
class CurrentPathStack
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\PathMembers
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. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Path!CurrentPathStack.php/class/CurrentPathStack/8.1.x