[symfony-users] Re : [Symfony2] Repeated Type Field for Password.

2011-05-10 Thread symfonyMan
Hello Matador, like this : $builder-add('password','repeated', array('type'='password', 'first_name'='password', 'second_name' ='confirm you password')); or just like this : $builder-add('password','repeated'); hope this help ;) -- If you want to report a vulnerability issue on symfony,

[symfony-users] [Routing] Add the _locale in the prefix for included routes

2011-05-10 Thread Christophe Willemsen
hi all, I'm trying to get a _locale variables in the prefix for included routes. 1, It avoids the need to specify it for all routes of the included file 2, It gives the possibility to use the bundle with or without the _locale var Is it possible ? Is it planned to be enhanced in the

[symfony-users] Re: [Routing] Add the _locale in the prefix for included routes

2011-05-10 Thread Christophe Willemsen
Forgot to specify : it is on Symfony2 -- 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] Symfony2 multiple forms on one page

2011-05-10 Thread umpirsky
I have one form that have several subforms. Depending on radio button clicked, javascript expands one subform. In order to achieve this using form component, I have created many separated form objects, which are rendered under main form. Depedngin on radio switch ($request-get('radio')) I

[symfony-users] Re: Symfony2 multiple forms on one page

2011-05-10 Thread umpirsky
I see children can be added to form. But nothing in the doc. On 10 мај, 11:40, umpirsky umpir...@gmail.com wrote: I have one form that have several subforms. Depending on radio button clicked, javascript expands one subform. In order to achieve this using form component, I have created many

[symfony-users] symfony2 batch script

2011-05-10 Thread spider
Hello I was starting a project with symfony 1.4 but in the meantime symfony2 gone beta. My project is still in very early development so I'm evaluating to start over with Symfony2, which I'd have to do anyway at some point. I have some scripts which used the symfony 1.4 infrastructure but not

Re: [symfony-users] symfony2 batch script

2011-05-10 Thread Matt Robinson
On 10 May 2011, at 11:23, spider wrote: Hello I was starting a project with symfony 1.4 but in the meantime symfony2 gone beta. My project is still in very early development so I'm evaluating to start over with Symfony2, which I'd have to do anyway at some point. I have some scripts

Re: [symfony-users] symfony2 batch script

2011-05-10 Thread spider
On Tuesday, May 10, 2011 12:26:51 PM UTC+2, Matt Robinson wrote: On 10 May 2011, at 11:23, spider wrote: Is it still possible? Can someone help me or point me to an example or doc? This might help: http://blog.servergrove.com/2010/10/14/creating-console-commands-with-symfony2/ --

[symfony-users] Symfony2 - Ubuntu + Nginx + PHP5-FPM + APC errors

2011-05-10 Thread Josher
Hey All, I decided to set up a personal project at home for symfony2, and I decided to use nginx instead of Apache2. Everything works perfectly until I try and enable APC on Ubuntu, I receive the following errors: Notice: require(): 1. h-opened_path=[null] h-filename=[/home/josh/

[symfony-users] Re: Symfony2 multiple forms on one page

2011-05-10 Thread umpirsky
Now I' trying to do this http://symfony.com/doc/current/book/forms.html#embedding-a-collection-of-forms with: class PaymentFormType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder-add('paymentType'); $builder-add('payment',

[symfony-users] Re: How disable validation inherit parent?

2011-05-10 Thread elcabong
Controller: namespace MCP\AdminBundle\Controller; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use MCP\AdminBundle\Form\ParceiroType; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class ParceiroController

[symfony-users] [v2.0.0BETA1] Overriding bundle translations

2011-05-10 Thread dbenjamin
Hi, In Sf2, the system to override templates through a child bundle is great because it naturally organizes the files in a logic way (and inside the src directory). But i wonder why the same mechanism is not applied to the translation files ? Or maybe i'm not using it well. Take the

[symfony-users] Re: How to deal with Form Collection on Symfony2 Beta ?

2011-05-10 Thread barbacan
Thanks for this example! On 7 mai, 14:33, ryan weaver weaverr...@gmail.com wrote: Hi there! Take a look at this example:https://github.com/beberlei/AcmePizzaBundle/blob/master/Resources/vie... Basically, you should just iterate over addresses. There'll ultimately be a cookbook article

[symfony-users] [Symfony2] Validation callback constraints

2011-05-10 Thread John Wards
Okay so I have an out standing pull request to add support in for Closures https://github.com/symfony/symfony/pull/868 This means I can add in dynamic validation on a form via a Closure easily. The reason I started down this line is because of these lines of code:

[symfony-users] Re: How to deal with Form Collection on Symfony2 Beta ?

2011-05-10 Thread barbacan
Thanks for this example! But this doesn't work with me. With this call: {% for address in form.addresses %} tr td {{ form_widget(address.zipcode) }} {{ form_errors(address.zipcode) }} /td /tr {% endfor %} I have this error: Method zipcode for object

[symfony-users] Re: SF 2 - Referrer object similar to Request object?

2011-05-10 Thread theinterned
I solved this. I found the $router-match() method, which I am using against a cleaned up version of the $request-server-get('HTTP_REFERER'). This gives me the route parameters I need to generate my redirect route. Here is the completed action: public function switchLangAction($_locale)

[symfony-users] Re: Testing your Doctrine Entities and Repositories

2011-05-10 Thread Kevin
Would also like to know. On Mar 17, 10:04 am, Justin Fortier justfort...@gmail.com wrote: I'd like to know how to do this as well. On Mar 9, 9:33 am, Don Pinkster d...@pinkster.eu wrote: I amtestingmy services (controllers) with plain PHPUnit, this all works great. But now I want

[symfony-users] ManyToMany self related

2011-05-10 Thread Konrad Korzeniowski
Hello! Using symfony2 and doctrine I'm trying to build a graph (no loops) of referencing documents. I've properly built a self-related entity Document, so getting/setting closest parents and childs (each document can have any number of parents and/or childs) is not a problem. My question is:

Re: [symfony-users] Re: SF 2 - Referrer object similar to Request object?

2011-05-10 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi i think you should generate the current route with all locales you support and directly use those to switch the language, instead of having the client send a request and then redirecting. as a side note, instead of the string replacement, you

[symfony-users] [Symfony2]: Twig: How to access array value by decimal key?

2011-05-10 Thread noRerih
Hi, I've simple 2-dimentional array passed to template, $test = array('foo' = array(0 = 'asd', 1 = 'qwe')) If I try to do following in twig template: {{ test.foo.0 }} I got an error 'Item 0 for Array does not exist in'. Thanks in advance, any help appreciated. -- If you want to report a

[symfony-users] Re: SF 2 - Referrer object similar to Request object?

2011-05-10 Thread theinterned
Thanks for the pointing out the parse_url function David; I felt pretty iffy about all that string replacement. This is much cleaner (and is a great function to know!) I still had to strip the controller out as a seperate step, but that is cool. The new action looks like: public function

[symfony-users] Re: SF 2 - Referrer object similar to Request object?

2011-05-10 Thread theinterned
On the other point: I am not sure what you mean by your suggestion - I you suggesting that every controller action pass down a 'switched url' of itself to be rendered by the view? That seems like a lot to maintain. I am new to Symfony 2; maybe there is an elegant way to achieve this? On May 10,

[symfony-users] [FORM] Multitple Entity type

2011-05-10 Thread Vincent Lechemin
Hi, I'm trying to use the entity type with a OneToMany relationship, but it's not working. Is there anything special to do? Thanks, -- Vincent -- 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

Re: [symfony-users] [Symfony2]: Twig: How to access array value by decimal key?

2011-05-10 Thread Vincent Lechemin
Try the array access, test.foo[0] -- Vincent -- 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] Re: notice: serialize() __sleep

2011-05-10 Thread AndyPI
Don't know if it helps, but changing my variables from 'private' to 'protected' in Symfony2 entities removed this problem for me. The Symfony2 docs use protected in their examples, but the console generates variables as private. Something to look at? On Apr 19, 2:53 am, cordoval

[symfony-users] How to implement relationship to form?

2011-05-10 Thread user123
Hi guys, I have a customer and state tables. Customer is mapped to state one-to- one. Now I want to add state list to new customer page. How to implement it using relationship? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You

[symfony-users] [SF2 Beta 1] Questions about proxy cache

2011-05-10 Thread hub74
Hello, My Symfony's proxy cache is enabled (with default options). My action: Code: Select all public function indexAction() { $content = $this- renderView('AcmeDemoBundle:Essai:index.html.twig'); $response = new Response($content);

[symfony-users] Re: sf 1.4 - Widget _csrf_token does not exist?

2011-05-10 Thread niksfirefly
I know i can do that and more to disable csrf but i am modyfing admin generator(i want csrf when form submitted manually by user) and that is the most unobtrusive solution I found in docs but not working? also setting $form-disableLocalCSRFProtection(); not work! On 10 Maj, 07:41, Erkhembayar

[symfony-users] Re: Routing issue with dots in URL

2011-05-10 Thread Womble
Thanks, any chance of doing it via the annotations? On May 9, 7:30 pm, Chris Sedlmayr ch...@sedlmayr.co.uk wrote: You can set the segment separators per route using the options declaration. routeName:   options: { segment_separators: [/, ., -] } -- If you want to report a vulnerability

[symfony-users] How to overload the method which load the values in an edit form ?

2011-05-10 Thread Vincent B.
Hi, I work with Symfony 1.4. I try to find a way to overload the method which load the values in an edit form but don't find anything on the web. I use sfWidgetFormDateJQueryUI widget to setup a date. It works very well in the create form but in the edit form the default value is the mysql date

[symfony-users] [Symfony2] Adding classes to autoload

2011-05-10 Thread Inori
What I have: a class named someClass in a file named someFile.php in a folder named someFolder. I placed that folder in /vendor (so path to someFile.php is now / vendor/someFolder/someFile.php ). The file doesn't use namespaces. What I want: add that class to autoload so I could do $class = new

[symfony-users] ORM tutorials

2011-05-10 Thread user123
Hi guys, I need a ORM tutorial. I'm coded some ORM. But when I run app/ console doctrine:schema:create command relation between tables does not generated automatically / doesn't generate primary and foriegn key columns/. Please help me I need a very simple /one to one associated/ tutorial. --

[symfony-users] custom routring twig extension problem

2011-05-10 Thread sortex
i have a problem with custom twig extension which need to generate url acccording routs i just need to know how to add router to the constructor of my twig extension , symfony routing extension looks like this service id=twig.extension.routing class=Symfony\Bridge\Twig

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

2011-05-10 Thread Luis Cordova
I am still waiting for the answer to serialize question, in the meantime I am reading a book on PHP Objects and patterns, hope to some day understand On Tue, May 10, 2011 at 6:25 AM, AndyPI a...@pureinnovation.com wrote: Don't know if it helps, but changing my variables from 'private' to

[symfony-users] [Symfony 2] Creating Custom Field Types

2011-05-10 Thread badllama77
Hi, Enjoying the new form classes. I was wondering if there was an ETA on Creating Custom Field Types cookbook? I created a class using the countrytype as a template, but I am wondering how to inform symfony it exists? Thanks -- If you want to report a vulnerability issue on symfony,

Re: [symfony-users] [Symfony2] Adding classes to autoload

2011-05-10 Thread Christophe COEVOET
Le 10/05/2011 07:53, Inori a écrit : What I have: a class named someClass in a file named someFile.php in a folder named someFolder. I placed that folder in /vendor (so path to someFile.php is now / vendor/someFolder/someFile.php ). The file doesn't use namespaces. What I want: add that class

Re: [symfony-users] Re: Routing issue with dots in URL

2011-05-10 Thread Christophe COEVOET
Le 09/05/2011 21:21, Womble a écrit : Thanks, any chance of doing it via the annotations? From my reading of the code, I think it is @extra:Route(/hello, options={segment_separator=/) but I may be wrong about the way to define an associative array for the options. -- Christophe | Stof --

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

2011-05-10 Thread Christophe COEVOET
Le 10/05/2011 13:25, AndyPI a écrit : Don't know if it helps, but changing my variables from 'private' to 'protected' in Symfony2 entities removed this problem for me. The Symfony2 docs use protected in their examples, but the console generates variables as private. Something to look at? The

Re: [symfony-users] custom routring twig extension problem

2011-05-10 Thread Christophe COEVOET
Le 10/05/2011 21:17, sortex a écrit : i have a problem with custom twig extension which need to generate url acccording routs i just need to know how to add router to the constructor of my twig extension , symfony routing extension looks like this service id=twig.extension.routing

Re: [symfony-users] [SF2 Beta 1] Questions about proxy cache

2011-05-10 Thread Christophe COEVOET
Le 10/05/2011 18:20, hub74 a écrit : Hello, My Symfony's proxy cache is enabled (with default options). My action: Code: Select all public function indexAction() { $content = $this- renderView('AcmeDemoBundle:Essai:index.html.twig'); $response = new

Re: [symfony-users] Re: Testing your Doctrine Entities and Repositories

2011-05-10 Thread oscar balladares
I have made this same question, and no answer given to current date :( I would even appreciate a There is no way to accomplish it answer, that would be better than nothing :'( 2011/5/10 Kevin kevinb...@gmail.com Would also like to know. On Mar 17, 10:04 am, Justin Fortier

Re: [symfony-users] Re: Testing your Doctrine Entities and Repositories

2011-05-10 Thread Luis Cordova
you need more understanding as to what is really a unit testing and what is an entity class, I am sure Stof or other will notice your email, basically just go read the documentation over and over www.symfony.com On Tue, May 10, 2011 at 8:47 PM, oscar balladares liebegr...@gmail.com wrote: I have

Re: [symfony-users] Re : [Symfony2] Repeated Type Field for Password.

2011-05-10 Thread oscar balladares
Thank you s much!. Probably giving thanks may be some sort of spam, but I have to do it.! 2011/5/10 symfonyMan ezziani.cha...@gmail.com Hello Matador, like this : $builder-add('password','repeated', array('type'='password', 'first_name'='password', 'second_name' ='confirm you

[symfony-users] Symfony2 - APC/PHP5-FPM/Ubuntu

2011-05-10 Thread Josher
Hey All, My application works perfectly fine with NGINX 1.0.1 + PHP5-FPM, except when I try and enable APC, which gives me the following error. My code is a little out of date, but the same thing happens with the current revision as well: Notice: require(): 1. h-opened_path=[null]

[symfony-users] Symfony2 - APC/PHP5-FPM/Ubuntu

2011-05-10 Thread Josher
Hey All, My application works perfectly fine with NGINX 1.0.1 + PHP5-FPM, except when I try and enable APC, which gives me the following error. My code is a little out of date, but the same thing happens with the current revision as well: Notice: require(): 1. h-opened_path=[null]

[symfony-users] Re: [Routing] Add the _locale in the prefix for included routes

2011-05-10 Thread winzou
I'm interested as well in this issue. Is it / Will it be possible to add core parameters in the prefix when importing bundle's routing file? -- 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