Skip to content

Commit 8140425

Browse files
committed
Added fragment support
1 parent ca696ad commit 8140425

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Bridge/ContextInjector.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,16 @@ public static function getSubscribedEvents()
7676

7777
public function getOperationName(Request $request)
7878
{
79+
if (null !== ($fragment = $request->attributes->get('is_fragment'))) {
80+
return ($controller = $request->attributes->get('_controller', null))
81+
? 'fragment'
82+
: sprintf('fragment.%s', $controller);
83+
}
84+
7985
if (null === ($routeName = $request->attributes->get('_route', null))) {
8086
return $request->getRequestUri();
8187
}
88+
8289
if (null === ($route = $this->router->getRouteCollection()->get($routeName))) {
8390
return $request->getRequestUri();
8491
}

0 commit comments

Comments
 (0)