[symfony-users] Aw: Re: [symfony2] How to use bundles?

2011-04-17 Thread Sebastian Göttschkes
Hi, I think I now got the idea of bundles. But I got another related question. Where would I put Controllers and views not organized in a bundle, e.g. static pages of my web app (homepage, imprint)? I would need a controller handling the request I think (at least in symfony1 there was always a

[symfony-users] [Symfon2] Twig vs PHP

2011-04-17 Thread Ruben de Vries
Looking around the google group and the various blogs (and documentation in the book/cookbook) I get the feeling that most people are now using twig as their templating engine. When I started with sf2 I almost instantly decided that I wouldn't want to use twig since learning and using yet another

[symfony-users] Re: [Symfon2] Twig vs PHP

2011-04-17 Thread violyn
twig is very easy to learn and you will be able to get results faster and with less lines of code. i recommend it. -- 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

[symfony-users] [Symfony2] get the entityManager inside of webtestcases

2011-04-17 Thread Stephan Petzl
Hi there! I was wondering how I could retrieve the entitymanager inside of a WebTestCase instance, e.g. to look whether a entity was really created in DB during the testrun. Any ideas on that? BR Stephan -- If you want to report a vulnerability issue on symfony, please send it to security at

[symfony-users] [Symfony2] creating routes on the fly (dynamic routes)

2011-04-17 Thread noRerih
Hi, is there way to create dynamic routes in controller (to use it for redirecting in $this-generateUrl() method)? Thank you. -- 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

[symfony-users] Re: Couple of Symfony2 questions

2011-04-17 Thread robjensen82
Thanks very much for that Jordi, will have another go today. Rob On Apr 16, 8:48 pm, Jordi Boggiano j.boggi...@seld.be wrote: On 15.04.2011 13:45, robjensen82 wrote: Hi there, I'm new to both Symfony2 and git, enjoying having a go with both at the moment. I've downloaded and extracted

[symfony-users] How add URL-pattern via bundle extension?

2011-04-17 Thread JohnMan
Hello! How add URL-pattern via bundle extension (not via controller) ? -- 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

[symfony-users] FOS FacebookBundle

2011-04-17 Thread Reuven
Hello, I'm trying to use the FOS FacebookBundle for developing facebook apps, with the security component. Despite all my efforts, I don't manage to get an authenticated user in my app. Does anybody succeed to use security component and FacebookBundle ? -- If you want to report a vulnerability

Re: [symfony-users] twig check for array field existence

2011-04-17 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 thanks oscar, john and jordi a cool syntax, the for/else, twig is really useful :-) actually i need to distinguish whether i have 0 children, 0 children or the children array is missing, which means the code did not check whether there where children

Re: [symfony-users] [Symfony2] Controller before and after action (controller filters)

2011-04-17 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 was starting to write you should have a look at the doc http://symfony.com/doc/2.0/book but actually, it is not in there, or at least not where i would expect it to be. however, google for symfony2 event brings up this as second result:

[symfony-users] Re: [Symfony2] Controller before and after action (controller filters)

2011-04-17 Thread ericclemmons
Some of the primary events are listed here: http://symfony.com/doc/2.0/book/internals/kernel.html#events You likely want onCoreRequest and onCoreResponse. On Apr 17, 10:00 am, David Buchmann david.buchm...@liip.ch wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 was starting to write you

[symfony-users] Re: Symfony2 workflow with model in controller

2011-04-17 Thread ericclemmons
Because your model is just a POPO (Plain-Old PHP Object), just use the `use` command in your controller: // DefaultController.php ... use MyBundle\Entity\User; public class DefaultController extends Controller { ... $user = new User(); // Instantiates MyBundle\Entity\User;

[symfony-users] Re: Twig vs PHP

2011-04-17 Thread ericclemmons
Twig is the recommended templating language for your Symfony Bundles as well: http://symfony.com/doc/2.0/book/bundles.html#templates You'll soon find yourself in the minority with PHP templating in Symfony. (And Twig is really really good, especially from a caching perspective) On Apr 17, 8:07 

[symfony-users] Re: [Symfony2] creating routes on the fly (dynamic routes)

2011-04-17 Thread A A
I've explored code a little and tried following in controller: use Symfony\Component\Routing\Route; ... $route = new Route('/flyroute, array('_controller' = 'FlyBundle:index:index')); $routeCollection = $this-get('router')-getRouteCollection(); $routeCollection-add('fly', $route); // when

[symfony-users] Re: Couple of Symfony2 questions

2011-04-17 Thread ericclemmons
As for using PHP configuration, within AppKernel.php, you can modify this: public function registerContainerConfiguration(LoaderInterface $loader) { // Default: $loader-load(__DIR__.'/config/config_'.$this- getEnvironment().'.yml'); $loader-load(__DIR__.'/config/config_'.$this-

Re: [symfony-users] [Symfony2] validation of runtime generated object properties / dynamic forms

2011-04-17 Thread Bernhard Schussek
Hi Holger, You can use the Callback constraint for this purpose. You can see an example of its usage in DelegatingValidator::validateFormData(): https://github.com/symfony/symfony/blob/form/src/Symfony/Component/Form/Validator/DelegatingValidator.php What is necessary for this approach: - a

Re: [symfony-users] Re: [Symfony2] Controller before and after action (controller filters)

2011-04-17 Thread A A
Thank you, guys! But maybe I'm too captious, but it doesn't seem to be convenient way to implement 'beforeActionRun' for each controller. I registered 'onControllerRequest' listener. But what should I do further: making switch to define which controller was exactly requested and depending ion

[symfony-users] [Symfony2] The S2 blog is not being updated!!!

2011-04-17 Thread oscar balladares
:'( Anybody knows when 'A week of Symfony' is going to be updated?? I really enjoy reading it!!! -- 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

Re: [symfony-users] Re: [Symfony2] Controller before and after action (controller filters)

2011-04-17 Thread Jeremiah Dodds
On Sun, Apr 17, 2011 at 12:34 PM, A A kaupa...@gmail.com wrote: Thank you, guys! But maybe I'm too captious, but it doesn't seem to be convenient way to implement 'beforeActionRun' for each controller. I registered 'onControllerRequest' listener. But what should I do further: making switch

Re: [symfony-users] [Symfon2] Twig vs PHP

2011-04-17 Thread Jeremiah Dodds
On Sun, Apr 17, 2011 at 7:25 AM, Ruben de Vries rubensay...@gmail.comwrote: So? Is it me? Or is Twig really getting the upper hand? Twig rocks. Its code is clean and it has well-defined extension points, and it's a pretty well designed library for its purposes. I can't say the same about PHP

Re: [symfony-users] Validation propagating to related entities in Symfony2

2011-04-17 Thread Dennis Jacobfeuerborn
Hi, I think the reference should be validated but not necessarily the whole entity the reference points to. Regards, Dennis On Sunday, April 17, 2011 10:36:43 AM UTC+2, Bernhard Schussek wrote: Hi Matt, The problem is that by default the data of each field is validated. For the entity

[symfony-users] Re: creating routes on the fly (dynamic routes)

2011-04-17 Thread JohnMan
will be those routers cached? of will be created on every request of controller ? -- 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

[symfony-users] Re: [SF2] Pre-execute under SF2

2011-04-17 Thread kassel
Hi All, At last i need not to repeat some methods in some diferents actions, and at las inyect data under the wiew?, like in SF 1.4 exists preExecute there is Something under SF2 Thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

[symfony-users] Re: The S2 blog is not being updated!!!

2011-04-17 Thread Stephan Petzl
me too!!! On Apr 17, 6:59 pm, oscar balladares liebegr...@gmail.com wrote: :'(  Anybody knows when 'A week of Symfony' is going to be updated?? I really enjoy reading it!!! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You

Re: [symfony-users] Validation propagating to related entities in Symfony2

2011-04-17 Thread Bernhard Schussek
2011/4/17 Dennis Jacobfeuerborn djacobfeuerb...@gmail.com: I think the reference should be validated but not necessarily the whole entity the reference points to. The reference would be validated anyway because the reference is a property of the main object. Bernhard -- If you want to report

[symfony-users] [SF2]self encoder into authentication

2011-04-17 Thread kassel
Hi, i need to implement self encoder, or basic help into MessageDigestPasswordEncoder, the reason in th BD exists and the password used is only md5 without salt, so the password generated is only like this: $pwd=md5($_REQUEST[password]); so i've got two options : -use MessageDigestPasswordEncoder

[symfony-users] Re: Recaptcha validation in symfony 2

2011-04-17 Thread Carl
Hi, I'm having the same exact problem. Everything works except the actual validation part. I've checked and re-checked how this bundle handles validation and it looks like everything should be loading ok. The form renders just fine and the images can be changed. But the validator service for

[symfony-users] Re: notice: serialize() __sleep

2011-04-17 Thread cordoval
This is the notice that i am getting on my controller Notice: serialize(): sessionverses returned as member variable from __sleep() but does not exist in /home/cordoval/sites-2/ memorizescripture/vendor/symfony/src/Symfony/Component/Security/Core/ Authentication/Token/AbstractToken.php on line

[symfony-users] Proper way of using a logger in Symfony2?

2011-04-17 Thread JC
I couldn't find references on the proper use to integrate a logger in my code. I tried the following inside a controller, but I didn't see any output in the log file. Any ideas? public function loginAction() { $logger = $this-get('logger'); .

Re: [symfony-users] Re: creating routes on the fly (dynamic routes)

2011-04-17 Thread A A
I plan create them only on request controller, no caching needed. 2011/4/17 JohnMan lubomir1...@gmail.com will be those routers cached? of will be created on every request of controller ? -- If you want to report a vulnerability issue on symfony, please send it to security at

[symfony-users] Re: notice: serialize() __sleep

2011-04-17 Thread cordoval
just spent half of the week trying to resolve the problem nobody on IRC channel was able to spot it please core devs help me here, don't let me dispair... On Apr 17, 8:44 pm, cordoval cordo...@gmail.com wrote: This is the notice that i am getting on my controller Notice: serialize():