-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RouteCollection::getRouteName #6776
Conversation
b878c44
to
a8788ac
Compare
a8788ac
to
3d94b67
Compare
Friendly ping @sonata-project/contributors :) |
Should be added to |
3d94b67
to
5349da3
Compare
Yes indeed, added. |
@@ -123,6 +125,9 @@ public function getBaseControllerName(); | |||
*/ | |||
public function getBaseRouteName(); | |||
|
|||
// NEXT_MAJOR: Uncomment the following line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NEXT_MAJOR: Uncomment the following line. | |
// NEXT_MAJOR: Uncomment the following line and remove corresponding @method annotation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
5349da3
to
fd8554a
Compare
Please take a look @OskarStark :) (Or you can dismiss the review @greg0ire, since the change asked was made) |
Thanks @VincentLanglet! |
Subject
I am targeting this branch, because BC.
Currently, I don't see any way to get the routeName of the postAdmin list.
It's computed as
sprintf('%s_%s', $this->baseRouteName, $name);
inRouteCollection::add
and it's done the same way in the AbstractAdmin.I'm not sure about the name of the method and where to put it.
Now you can do
$this->admin->getRoutes()->getRouteName('show')
.I would have prefer to do
$this->admin->getRouteName('show')
but then it would be harder to call it inRouteCollection
.Changelog