File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1818 */
1919final class AdminUrlGenerator implements AdminUrlGeneratorInterface
2020{
21- private bool $ isInitialized = false ;
21+ public bool $ isInitialized = false ;
2222 private ?string $ dashboardRoute = null ;
2323 private ?bool $ includeReferrer = null ;
2424 /** @var array<string, mixed> */
@@ -288,11 +288,14 @@ public function generateUrl(): string
288288 // if no route parameters are passed, the route doesn't point to any CRUD controller
289289 // action or to any custom action/route; consider it a link to the current dashboard
290290 if ([] === $ routeParameters ) {
291+ $ this ->isInitialized = false ;
292+
291293 return $ this ->urlGenerator ->generate ($ this ->dashboardRoute , [], $ urlType );
292294 }
293295
294296 if (null !== $ routeName = $ this ->get (EA ::ROUTE_NAME )) {
295297 $ adminRoutes = $ this ->cache ->getItem (AdminRouteGenerator::CACHE_KEY_ROUTE_TO_FQCN )->get ();
298+ $ this ->isInitialized = false ;
296299 if (null !== $ adminRoutes && \array_key_exists ($ routeName , $ adminRoutes )) {
297300 return $ this ->urlGenerator ->generate ($ routeName , $ routeParameters [EA ::ROUTE_PARAMS ] ?? [], $ urlType );
298301 }
You can’t perform that action at this time.
0 commit comments