Hi Christophe, On 23 fév, 18:22, stof <s...@notk.org> wrote: > On Wed, 23 Feb 2011 09:08:33 -0800 (PST), Lideln <lid...@gmail.com> wrote: > > Hi Carlos, > > > Thank you for the answer ! > > This is a good idea to use options to pass the EM, I will follow your > > advice ! > > Using an option is the good way to give the em to the form. This is how it > has to be passed to the EntityChoiceField so just add it as a required > option in your own form class. > > > Nevertheless, it would be easier to be able to access the EM globaly, > > with an utility class or whatever (and this is not restricted to the > > em, but it would be great to be able to access the container from > > anywhere and not only the view). > > The container cannot be accessed from the view. >
What about $view->container ? > The container will not be accessible globally as this is not its purpose. > It is meant to inject dependencies in the services, not to give access to > all services everywhere. an entity or a template should not have access to > the container. > > > > > I will wait to see if my two first bugs are fixed in the (hopefully > > upcoming) RC1 ! :) > > > Thanks again, > > Regards > > -- > Christophe | Stof -- 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 symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en