8000 Generate URLs from objects · Issue #11177 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

Generate URLs from objects #11177

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

Closed
edwines opened this issue Jun 20, 2014 · 6 comments
Closed

Generate URLs from objects #11177

edwines opened this issue Jun 20, 2014 · 6 comments
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony)

Comments

@edwines
Copy link
edwines commented Jun 20, 2014

It would be nice to allow the generation of routes from an object (just like the symfony1 times)

So instead of this:
{{ path('product_show', {'id': product.id, 'slug': product.slug}) }}
We can do this:
{{ path('product_show', product) }}

For more information check this stackoverflow question, and this gist

@apfelbox
Copy link
Contributor

I would like it, too. It would be the inverse element to the @ParamConverter.

@javiereguiluz
Copy link
Member

👍 I've also missed this feature several times. And as pointed by @apfelbox, we already have the opposite feature (ParamConverter).

@stof
Copy link
Member
stof commented Jun 20, 2014

For people wanting something like that today, @schmittjoh created an object-routing library a while back: http://jmsyst.com/libs/object-routing

@Tobion
Copy link
Contributor
Tobion commented Jun 20, 2014

duplicate of #10395

@javiereguiluz
Copy link
Member

@Tobion indeed it's a duplicated issue. So, maybe we should close this issue?

@stof
Copy link
Member
stof commented Jun 20, 2014

Closing as duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony)
Projects
None yet
Development

No branches or pull requests

5 participants
0