private function RenameAdminPathsEventSubscriber::matchRouteByPath in Rename Admin Paths 8.2
Parameters
Route $route:
string $path:
Return value
boolean
match /path, /path/ and /path/* but not /path*
1 call to RenameAdminPathsEventSubscriber::matchRouteByPath()
- RenameAdminPathsEventSubscriber::replaceRoutePath in src/
EventSubscriber/ RenameAdminPathsEventSubscriber.php
File
- src/
EventSubscriber/ RenameAdminPathsEventSubscriber.php, line 108
Class
Namespace
Drupal\rename_admin_paths\EventSubscriberCode
private function matchRouteByPath(Route $route, string $path) : bool {
return (bool) preg_match(sprintf('~^/%s(?:/(.*))?$~', $path), $route
->getPath());
}