public function PathPrefixMethod::exitContext in Persistent URL 8
Overrides MethodInterface::exitContext
File
- src/
Plugin/ Purl/ Method/ PathPrefixMethod.php, line 39
Class
- PathPrefixMethod
- Plugin annotation @PurlMethod( id="path_prefix" )
Namespace
Drupal\purl\Plugin\Purl\MethodCode
public function exitContext($modifier, $path, array &$options) {
if (!$this
->pathContains($modifier, $path)) {
return null;
}
return substr($path, 0, strlen($modifier) + 1);
}