public function PathListenerBase::extractPath

4 calls to PathListenerBase::extractPath()
PathSubscriber::onKernelRequestDecodePath in drupal/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
Decodes the path of the request.
PathSubscriber::onKernelRequestFrontPageResolve in drupal/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
Resolve the front-page default path.
PathSubscriber::onKernelRequestPathResolve in drupal/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
Resolve the system path.
PathSubscriber::onKernelRequestPathResolve in drupal/core/modules/system/tests/modules/url_alter_test/lib/Drupal/url_alter_test/PathSubscriber.php
Resolve the system path based on some arbitrary rules.

File

drupal/core/lib/Drupal/Core/EventSubscriber/PathListenerBase.php, line 17
Definition of Drupal\Core\EventSubscriber\PathListenerBase.

Class

PathListenerBase
Base class for listeners that are manipulating the path.

Namespace

Drupal\Core\EventSubscriber

Code

public function extractPath(Request $request) {
  $path = $request->attributes
    ->get('system_path');
  return isset($path) ? $path : trim($request
    ->getPathInfo(), '/');
}