I have an setting loaded from my config and depending on this entry I
want the link in my menu to point to something different.
my_conf:
item: item_name
I have a service that runs to pull out the entity with the name
item_name and then I am able to access that entitys id property. In
the controller for this entity I have a show route that takes an id
parameter. What I want to do is add the following line to my menu
class
$this->addChild('Item', $router->generate('show',array('id' => $item-
>getId(Id)));
however, from the menu bundle I don't have access to a container that
I can get access to my service to access the entity. So my question is
do I have to modify the menu and inject a container that will let me
call something like
$container->get('item')->getItem()->getId();
or is there another way that I can or should be creating such links?
I would still classify myself as a newbie so I apologize if this
question has an obvious answer.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en