8000 Object Routing · Issue #2288 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Object Routing #2288

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
lmcd opened this issue Sep 28, 2011 · 4 comments
Closed

Object Routing #2288

lmcd opened this issue Sep 28, 2011 · 4 comments
Labels

Comments

@lmcd
Copy link
Contributor
lmcd commented Sep 28, 2011

Any chance we'll get to see object routing from sf1.x. Would be great to generate URLs from doctrine entities.
Note: I know about ParamConverter

@Koc
Copy link
Contributor
Koc commented Sep 28, 2011

generate URLs from doctrine entities

IMHO this breaks single responsibility principle

@henrikbjorn
Copy link
Contributor

You could do your own helper called something like {{ object_route(myObject) }} and have myObject implement an interface which returns the parameters used and the route name needed.

<?php

interface ObjectRouteInterface
{
    function getRouteName();

    function getRouteParameters();
}

@fabpot
Copy link
Member
fabpot commented Oct 26, 2011

In Symfony2, the routing component is just about converting a path info into parameters, nothing more. We already have param converters to automatically convert request attributes to objects. So, we probably can think about how to do the same for generation (no idea how to do that though).

@lsmith77
Copy link
Contributor

have a look at this Bundle: https://github.com/symfony-cmf/ChainRoutingBundle

so i think we can close this ticket ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants
0