Re: [symfony-users] Re: [Symfony 2] Embedding Controller to Template

2011-04-01 Thread oscar balladares
Hi nerdess. If you want to return a string from a controller instead returning a twig template you should: return new Response('HI, Im a string'); Also you have to: use Symfony\Component\HttpFoundation\Response; in the imports of the controller. 2011/4/1 nerdess > That is really helpful to

Re: [symfony-users] [Symfony2] Problem with last commit of master branch

2011-04-01 Thread Gustavo Adrian
Good catch! I didn't see that change. Thanks for the info! :) 2011/4/1 Illya Klymov > This is due to this commit by Fabien - > https://github.com/symfony/symfony/commit/ce4a8de789fbcbc965a3be3bdee362ba17fc0dc8 > Now session.default_locale is not used :) > > -- > If you want to report a vulnera

[symfony-users] Re: AsseticBundle Configuration + Usage

2011-04-01 Thread Wizermil
Hi, I confirm it was a mistake in my code, my bad. I didn't write the right path in output attribute. I forget about the system folder "web/bundles" (generated automatically by app/console assets:install web) I thought it was handled by the framework but not : (. Whatever, I can explain how I fix

Re: [symfony-users] [Symfony2] Problem with last commit of master branch

2011-04-01 Thread Illya Klymov
This is due to this commit by Fabien - https://github.com/symfony/symfony/commit/ce4a8de789fbcbc965a3be3bdee362ba17fc0dc8 Now session.default_locale is not used :) -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this

[symfony-users] Re: Jobeet (doctrine help)!

2011-04-01 Thread FHoerth
Thanks for answering! I have some doubts about how symfony and doctrine works, I think that jobeet would be so much easier if the doctrine documentation was better. Other possibility is that I greatly complicating the doctrine understanding,what do you mean by creating that method? As far as I know

[symfony-users] Re: Jobeet (doctrine help)!

2011-04-01 Thread FHoerth
I Just posted my answer but it seems that was an error, if tomorrow doesn't appear I will answer again. Thank you for answering Roger On 1 abr, 00:13, Roger Webb wrote: > As I best understand it, the "table" object is supposed to act as a > repository.  You would, ideally, add methods to the tabl

[symfony-users] Re: [Symfony 2] Embedding Controller to Template

2011-04-01 Thread nerdess
That is really helpful to know though I am wondering.what if the controller looks sth like this and returns a simple string but not a template: public function () { //do magic stuff return $bla } how can i echo out what's inside $bla in my twig-template? Thanks Sissi -- If you want

[symfony-users] JSON default content type

2011-04-01 Thread OnDistantShores
Hi, I'm new to Symfony but am loving it! My project involves two applications - a frontend app and a dedicated API app. The API will deal primarily in JSON, so I want to make that the default HTTP content type for all requests to that app. I know you can set that via $this->getResponse()->setHttp

[symfony-users] [Symfony2] How to use services for entity persisting

2011-04-01 Thread Ruben de Vries
I'm not really sure that I'm on the right track here but I think I am and that I just need to the last pieces of the puzzle to get there ... I want to use an seperated xManager for my entities (lets say UserManager just like in the FOS\UserBundle). Looking at the documentation about service co

[symfony-users] Form to change a username logs me in as another user if I enter their username

2011-04-01 Thread Philip Cole
Hi all, This is kind of weird and I don't understand how it happens. Hope someone can help or has an idea why it could happen. I created a simple form to change my authenticated user's username and when I change to somebody else's username I get an error (because the username is unique) but on the

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
Well, after updating everything it didn't work. So I moved temporarily my app/Resources/views/base.html.twig to a bundle and now it works like a charm. I'll take a look again later if I find the error and I'll let you know guys what happend. Thanks. 2011/4/1 Gustavo Adrian > It should work th

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
It should work this way too. I updated my sandbox so it looks almost the same as the SE. I'm making all the updates on the code now. I'll try again when I finish. It's a big move to update this time :P Thanks! 2011/4/1 oscar balladares > Hi. > > you might want to download the SE PR9 and import

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread oscar balladares
Hi. you might want to download the SE PR9 and import your bundle, anyway bundles are meant to be able to hook up very easily. I'm using PR9 and base.html.twig is in app/Resources/views and is working. Saludos. 2011/4/1 Gustavo Adrian > Yes, I cleared the cache and removed the "Bundle" suffix

Re: [symfony-users] Trying to use "sfConfig::set" to set flag for filter

2011-04-01 Thread Jonathan Franks
Yohan - the event is a doctrine save. The save is being called from an action. So, by the time the action is running, the global config will have been loaded, right? Or am i missing something? Thanks On 1 Apr 2011, at 16:12, Yohan GIARELLI wrote: > Hi, > > I think the global configuration is l

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
Yes, I cleared the cache and removed the "Bundle" suffix for routes and templates names for rendering. I still don't know why it doesn't find the layout. Could it be that saying "TEMPLATE does not exists" really means that there's an error at some place in the app? Anyway, I didn't see the UPDATE

[symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Roger Webb
Looks like you beat me too it. Did you clear app/cache? I had problems there. You also have to change everything that has the "Bundle" suffix. It's a lot of find/ replace on all of your templates (every template that "extends" another). Roger On Apr 1, 11:09 am, Roger Webb wrote: > If you ju

[symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Roger Webb
If you just upgraded to PR9, the base template is now in app/Resources/ base.html.twig https://github.com/symfony/symfony/blob/master/UPDATE.md The upgrade from PR8 to PR9 was a bit more painful that previous ones. Read the update document thoroughly. Roger On Apr 1, 9:45 am, Gustavo Adrian w

[symfony-users] Re: [Symfony2] How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
Looking at the linked exceptions it shows this at the top of the stack trace: 1. InvalidArgumentException: The file "views/layout.html.twig" does not exist (in: /var/www/gestion/app/Resources, ). 2. at * FileLocator ->locate * ('views/layout.html.twig', '/var/www/myapp/app/Resources', *true*) thi

Re: [symfony-users] Trying to use "sfConfig::set" to set flag for filter

2011-04-01 Thread Yohan GIARELLI
Hi, I think the global configuration is loaded after your event is called, so that override your value... Yohan g. 2011/4/1 Jonathan Franks > I'm trying to set a flag in a doctrine listener so that a sfFilter knows > whether to do something or not. > > In the listener I have... > > sfConfig::

[symfony-users] Trying to use "sfConfig::set" to set flag for filter

2011-04-01 Thread Jonathan Franks
I'm trying to set a flag in a doctrine listener so that a sfFilter knows whether to do something or not. In the listener I have... > sfConfig::set('app_database_altered', true); In my filter I have... > public function execute($filterChain) > { > $filterChain->execute(); > var_dump (sfCon

[symfony-users] [Symfony2] How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
Hi, I have in one of my bundle's templates: {% extends "::layout.html.twig" %} This extended from app/views/layout.html.twig. After updating Symfony it throws an exception: "Unable to find template ""::layout.html.twig"". at line 0" How should I extend now from application specific templates?

[symfony-users] Re: authentication with email

2011-04-01 Thread symfonyMan
Thanks georg it work now :) On 1 avr, 11:27, georg wrote: > You just change the return value of getUsername(). Instead of returning the > user's name you return its email address > > public function getUsername() { > return $this->email; > > } -- If you want to report a vulnerability issue on

[symfony-users] Re: [symfony2]authentication with email

2011-04-01 Thread georg
You just change the return value of getUsername(). Instead of returning the user's name you return its email address public function getUsername() { return $this->email; } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received

Re: [symfony-users] Symfony2 validation: file constraint and mime type

2011-04-01 Thread Bernhard Schussek
Hi Dmitry, What operating system do you use? Bernhard -- 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

[symfony-users] [Symfony2] Routing

2011-04-01 Thread Tarjei Huse
Hi, is it possible to map a request parameter to a command paramter? I.e. map the url /search?query=myQuery to: class SomeSearchCommand { function executeSearch($query) {} } ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You re