Re: [symfony-users] Symfony2 Form as a Standalone component

2011-12-22 Thread Hristo Salabashev
Hi Hari, you can check how is it done in Silex: https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/FormServiceProvider.php The controller method createFormBuilder translates to public function createFormBuilder($data = null, array $options = array()) { return $this->

Re: [symfony-users] [Symfony2] Using ZendAMF with Symfony2

2011-12-21 Thread GaB
Hi Nick, do you mind sharing your findings about amf? thanks On 15/03/2011 3:44, Nick Jennings wrote: Hi All, I've been digging into Symfony2 and really love what I've learned so far. I will be needing a complete AMF3 solution, and have been planning on using ZendAMF since before I started d

[symfony-users] Symfony2 Form as a Standalone component

2011-12-21 Thread Hari K T
Hi Guys , I downloaded the Symfony2 Form components . I was looking how to create the form object . Is it the FormFactory , FormBuilder or anything else ? I looked the book http://symfony.com/doc/current/book/forms.html#book-form-creating-form-classes But its mainly on the Symfony controller

[symfony-users] [Symfony2] Missing mandatory parameter '_locale'

2011-10-04 Thread Alessandro Desantis
Hi guys. I'm trying to prefix all my routes with /{_locale}. So, I've moved them in routing_actual.yml and I've written the following in my *routing.yml *: _main: resource: routing_actual.yml prefix: /{_locale} requirements: _locale: en|it defaults: _locale: en

[symfony-users] [Symfony2] Form and $attributes

2011-06-23 Thread Grégoire
Hi, I'd really like writing somthing like: foreach ($form as $name=>$field) { if ($field->hasErrors()) $field->setAttribute("attr", array("class" => "error")); } But I can't because setAttribute is not implemented in the * Symfony\Component\Form\Form* class (and $attributes is private).

Re: [symfony-users] [symfony2] What is the best way to handle URLs in javascript files called by assetic

2011-06-22 Thread oscar balladares
I meant : 'if it is not a link-for-ajax-purpose, then you can use hidden fields'. 2011/6/22 oscar balladares > If you are calling another pages within tag, but using JS (i.e > ajax request) > you can get the link's url: > > $('#a-link').click(function(e){ > var $url = $(this).attr('href'); > $

Re: [symfony-users] [symfony2] What is the best way to handle URLs in javascript files called by assetic

2011-06-22 Thread oscar balladares
If you are calling another pages within tag, but using JS (i.e ajax request) you can get the link's url: $('#a-link').click(function(e){ var $url = $(this).attr('href'); $(this).preventDefault; //request content based on the url, with ajax. }); If it is not a request, you could use a dirty tric

[symfony-users] [Symfony2] problem when using PHP Template following the "Page Creation" documentation

2011-06-22 Thread WebDevPT
Hi, perhaps I'm wrong but following the steps from the http://symfony.com/doc/current/book/page_creation.html and using the PHP render option leads me to no template at all with just echoed chars. I used the twig template option using the proper render at *// src/Acme/HelloBundle/Controller/Hel

[symfony-users] [symfony2] What is the best way to handle URLs in javascript files called by assetic

2011-06-22 Thread Jake
I am using assetic in a twig template to include a javascript file from my bundle's public folder. The problem is this JS file has URLs in it to call other pages using jQuery. How should i handle these URLs? I could write the URLs as absolute paths - but this causes problems between the dev and pro

[symfony-users] [Symfony2] Theming embedded form

2011-06-22 Thread Grégoire
Hi, I'm currently working with addresses which are frequently reused through my application. That's why I would like to reuse the piece of forms that can render the Address related fields, so I decided to embed the AddressType form in other forms. Now I would like to customize theming for the A

Re: [symfony-users] [Symfony2 - SonataUserBundle] Why did you remove the getParent method from SonataUserBundle?

2011-06-21 Thread Thomas Rabaix
Best of both world : https://github.com/sonata-project/UserBundle/commit/374b9397f28ab52de15208486a497e98b855e9c5 On Tue, Jun 21, 2011 at 6:48 PM, Thomas Rabaix wrote: > You can still create your own bundle which extends FOSUserBundle. But yes > this duplicate the EasyExtends ideas ... Not sure

Re: [symfony-users] [Symfony2 - SonataUserBundle] Why did you remove the getParent method from SonataUserBundle?

2011-06-21 Thread Thomas Rabaix
You can still create your own bundle which extends FOSUserBundle. But yes this duplicate the EasyExtends ideas ... Not sure if the user want to extends the FOSUserBundle or SonataUserBundle... maybe there is a way to make it optional. On Tue, Jun 21, 2011 at 6:27 PM, keymaster wrote: > Here's a

Re: [symfony-users] [Symfony2 - SonataUserBundle] Why did you remove the getParent method from SonataUserBundle?

2011-06-21 Thread keymaster
Here's a use case: If you use EasyExtends to create an Application/Sonata/UserBundle, and there you want to override the FOSUserBundleTemplates, you need the SonataUserBundle to inherit from FOSUserBundle, or you won't be able to do that. So, while SonataUserBundle doesn't override anything fr

Re: [symfony-users] [Symfony2 - SonataUserBundle] Why did you remove the getParent method from SonataUserBundle?

2011-06-21 Thread Thomas Rabaix
There is for now no need for the SonataUserBundle to extends the FOSUSerBundle. The only purpose is to integrate the FOSUserBundle into the Sonata AdminBundle. However depends on the need this might change, but I don't see a use case for now On Tue, Jun 21, 2011 at 6:12 PM, Christophe COEVOET wr

Re: [symfony-users] [Symfony2 - SonataUserBundle] Why did you remove the getParent method from SonataUserBundle?

2011-06-21 Thread Christophe COEVOET
Le 21/06/2011 18:08, keymaster a écrit : Was your intent to remove any explicit inheritance to a particular user bundle implementation? If so, I guess we will have to add the inheritance ourselves to the user bundle of our choice... You may want to make that clearer in the documentation. The

[symfony-users] [Symfony2 - SonataUserBundle] Why did you remove the getParent method from SonataUserBundle?

2011-06-21 Thread keymaster
Was your intent to remove any explicit inheritance to a particular user bundle implementation? If so, I guess we will have to add the inheritance ourselves to the user bundle of our choice... You may want to make that clearer in the documentation. -- If you want to report a vulnerability issu

[symfony-users] [Symfony2] How extend Entity Repository in bundle?

2011-06-21 Thread Ваня Масич
If through *event_dispatcher* service and *kernel.listener* then how I can access from EntityRepository to service container? -- 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

Re: [symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Ваня Масич
Thanks for help, I don't known about event_dispatcher service before. -- 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 gro

Re: [symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Christophe COEVOET
Le 21/06/2011 11:22, ? a écrit : But how I can take event dispatcher instance in bundle controller that know about registered listeners (as service), or every event dispatcher instance take listeners in service container by tag kernel.listener? In past i think that for use event dispat

Re: [symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Ваня Масич
But how I can take event dispatcher instance in bundle controller that know about registered listeners (as service), or every event dispatcher instance take listeners in service container by tag kernel.listener? In past i think that for use event dispatcher I should make new instance of it, and

Re: [symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Jordi Boggiano
On 21.06.2011 10:47, Christophe COEVOET wrote: > Le 21/06/2011 10:46, Christophe COEVOET a écrit : >> Le 21/06/2011 10:43, Ваня Масич a écrit : >>> I read in symfony documentation "*How to extend a Class without using >>> Inheritance*" >>> http://symfony.com/doc/current/cookbook/event_dispatcher/c

Re: [symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Christophe COEVOET
Le 21/06/2011 10:46, Christophe COEVOET a écrit : Le 21/06/2011 10:43, ? a écrit : I read in symfony documentation "*How to extend a Class without using Inheritance*" http://symfony.com/doc/current/cookbook/event_dispatcher/class_extension.html and now thinking about how extend contr

Re: [symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Christophe COEVOET
Le 21/06/2011 10:43, ? a écrit : I read in symfony documentation "*How to extend a Class without using Inheritance*" http://symfony.com/doc/current/cookbook/event_dispatcher/class_extension.html and now thinking about how extend controller in bundle using event dispatcher. First I th

[symfony-users] [Symfony2] How extend controller in bundle?

2011-06-21 Thread Ваня Масич
I read in symfony documentation "*How to extend a Class without using Inheritance*" http://symfony.com/doc/current/cookbook/event_dispatcher/class_extension.html and now thinking about how extend controller in bundle using event dispatcher. First I think where I need put *addListener* with ne

Re: [symfony-users] Symfony2 : Query MongoDB collection

2011-06-20 Thread Christophe COEVOET
Le 20/06/2011 21:05, Adrien Mogenet a écrit : Hi everyone, I'm still trying to query my MongoDB store thanks to symfony2 and Doctrine ODM. I'm following these instructions : http://symfony.com/doc/current/cookbook/doctrine/mongodb.html So I tried : $dm = $this->get('doctrine.odm.mongodb.doc

[symfony-users] Symfony2 : Query MongoDB collection

2011-06-20 Thread Adrien Mogenet
Hi everyone, I'm still trying to query my MongoDB store thanks to symfony2 and Doctrine ODM. I'm following these instructions : http://symfony.com/doc/current/cookbook/doctrine/mongodb.html So I tried : $dm = $this->get('doctrine.odm.mongodb.document_manager'); $user = $dm->createQuery('find

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Michel Salib
@stof thanks ! -- 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 uns

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Christophe COEVOET
Le 20/06/2011 16:02, Michel Salib a écrit : I dug into it. And I see how to set validation group. But I don't see how to validate a form using it. @stof, is the form component missing something ? When creating a form, you can pass the /validation_group/s option (as an array of groups) to tell

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Michel Salib
I dug into it. And I see how to set validation group. But I don't see how to validate a form using it. @stof, is the form component missing something ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Ваня Масич
Thanks all for help, I'll try use this solution. -- 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 sy

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Michel Salib
Ok I found it here : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraint.php#L52 So I will be able to use it. Too bad there is not any documentation yet (or I did not find it). -- If you want to report a vulnerability issue on symfony, please send it to s

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Michel Salib
Hi stof, What is a validation group? I never heard of that before. -- 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

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Christophe COEVOET
Le 20/06/2011 14:34, ? a écrit : Sorry, I am new at symfony2, and I mean disable some validation rules on create/update. This is my *Entity*, I set for field *password* validation rule *NotBlank*, and this is true only for create, but on update I want disable this rule, how I can do

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Ваня Масич
Sorry, I am new at symfony2, and I mean disable some validation rules on create/update. This is my *Entity*, I set for field *password* validation rule *NotBlank*, and this is true only for create, but on update I want disable this rule, how I can do this?, Or maybe I should do this in *Form* c

Re: [symfony-users] [Symfony2] Can't understand how reverse proxy works

2011-06-20 Thread Christophe COEVOET
Le 18/06/2011 08:38, Inori a écrit : What I have: 2 computers on LAN, web server on one of them, to which I have access from both computers via 192.168.0.100. Symfony2 which uses reverse proxy cache with e-tag. app.php: http://pastebin.com/hupi9bYN controller code: http://pastebin.com/7mWSt3jv

Re: [symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Christophe COEVOET
Le 20/06/2011 11:09, ? a écrit : How I can make required field validation only for create, and disable it on update, for example when user register, field password should not be null, but on update it should not be null only if user whant update password? Set the /required/ option on the

Re: [symfony-users] Symfony2 doctrine returns not UTF-8 from UTF-8 table

2011-06-20 Thread Lajos Cseppentő
I managed to solve. I had to also set charset in config.yml at the doctrime dbal part On 17 June 2011 16:33, Marco Pivetta wrote: > Could you please check the encoding of your source files? Also check the > content-encoding headers sent by your web server :) > Marco Pivetta > http://twitter.com/

[symfony-users] symfony2 form - data never bound to it

2011-06-20 Thread james
i have a simple form in symfony2 (beta 5), but the post data is never bound to the form. here are my classes (trimmed for brevity): /** * Represents a User * * @ORM\Entity * @ORM\HasLifecycleCallbacks() */ class User { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\Gene

[symfony-users] [symfony2] Required fields on create/update

2011-06-20 Thread Ваня Масич
How I can make required field validation only for create, and disable it on update, for example when user register, field password should not be null, but on update it should not be null only if user whant update password? -- If you want to report a vulnerability issue on symfony, please send

[symfony-users] Symfony2 Form + Doctrine2 Updating an Entity

2011-06-20 Thread avanwieringen
I am testing the Form and Doctrine2 functionality of Symfony2 and I love it however, the documentation on the Symfony2 website is not entirely clear (to me) concerning the updating of an Entity. I have created a simple form for adding and deleting users. My controller action looks like follows:

[symfony-users] [Symfony2] Can't understand how reverse proxy works

2011-06-20 Thread Inori
What I have: 2 computers on LAN, web server on one of them, to which I have access from both computers via 192.168.0.100. Symfony2 which uses reverse proxy cache with e-tag. app.php: http://pastebin.com/hupi9bYN controller code: http://pastebin.com/7mWSt3jv Caching itself works fine (I go to the

[symfony-users] [Symfony2] Symfony2 + dreamhost + authentication (headers)

2011-06-18 Thread Apostolos Karakoussis
I wouldn't post this here but I guess others will find this problem in front of them. I've set up a symfony2 installation that supports http_basic authentication by using an entity from my database. It works well with my local installation (vanilla osx 10.6.7/apache 2.2.17) but when I pushed the p

[symfony-users] Symfony2 Trouble on Macosx

2011-06-18 Thread elcabong
I tested my app on opera, chrome , ie, safari and FF. I saw on macosx have a trouble, The opera, safari and chrome doesn't work submition form, but FF works. I tested same thing on linux and windons7, No have any trouble in submition form. What happened in macosx??? Tanks... -- If you want

Re: Re : Re: [symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-17 Thread Jeremiah Dodds
On Thu, Jun 16, 2011 at 4:24 AM, waldo2188 wrote: > Thanks for your response, but, *$this* hasn't method named *getService* . > > Oh, sorry about that. I forgot that I had defined the getService method :/. >From your other response, it looks like you figured it out though, sorry for the inaccura

Re: [symfony-users] symfony2 - how to do s.th. after a users has logged in?

2011-06-17 Thread Michael Holm
Hi, Yes you can.. just put it in as an argument: arguments: [@session] then get the session class in the constructor of the class.. http://symfony.com/doc/current/book/service_container.html Best regards, Michael Holm On Thu, Jun 16, 2011 at 8:33 PM, Flo wrote: > Hi, > > what I'm trying to

Re: [symfony-users] Symfony2 doctrine returns not UTF-8 from UTF-8 table

2011-06-17 Thread Marco Pivetta
Could you please check the encoding of your source files? Also check the content-encoding headers sent by your web server :) Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com 2011/6/16 Lajos Cseppentő > Hello everybody, > > My problem is the next: > I am new to symfony2, and i

Re : Re: [symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-17 Thread waldo2188
HOURA ! I've fix the problem ! Here is my entire Class namespace X\ModelBundle\Tests\DataFixtures; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use X\ModelBundle\Entity\BAdresseEnlevement; use X\ModelBundle\DataFixtures\ORM\Load01PurgeData; class Load01PurgeDataTest extends WebTestC

[symfony-users] Symfony2 doctrine returns not UTF-8 from UTF-8 table

2011-06-17 Thread Lajos Cseppentő
Hello everybody, My problem is the next: I am new to symfony2, and i am trying to develop a basic homepage. I created the database from shell and model class, generated the setters and getters. But if I read data from the database and print it out in the view, the special characters (such as á, é,

[symfony-users] symfony2 - how to do s.th. after a users has logged in?

2011-06-17 Thread Flo
Hi, what I'm trying to achieve is, that after a user has successfully logged in, set the locale of the session. I made a listener for onSecurityInteractiveLogin, there I have access to the user object, but I can't access the session container (can I?) The login_check action is never really calle

Re : Re: [symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-17 Thread waldo2188
Thanks for your response, but, *$this* hasn't method named *getService* . .PHP Fatal error: Call to undefined method BOD\ModelBundle\Tests\DataFixtures\Load01PurgeDataTest::getService() in /home/xxxwww/xxx/src/BOD/ModelBundle/Tests/DataFixtures/ORM/Load01PurgeDataTest.php Maybe we don't use th

[symfony-users] [Symfony2] AdminBundle - How to set the translationDomain for SonataUserBundle : UserAdmin ?

2011-06-17 Thread seven seven
Hi everyone, I am using Sonata UserBundle to manage users and groups in AdminBundle. My question is how to set the translationDomain to what I need in order to translations. I was thinking if there's a way to set this from my app config ... is this possible ? I know from the docs about placing th

[symfony-users] [Symfony2] ComwaysFormExtraBundle is no more?

2011-06-16 Thread Carl
I recently started using the excellent ComwaysFormExtraBundle and discovered today after coming back from a short vacation that it's apparently been deleted from Github. Does anyone know if there are plans to add some of the form extensions found in this bundle to another bundle or if developmen

[symfony-users] [Symfony2] Forms & Entities with Association Mappings

2011-06-16 Thread Aaron DM
Hello, I was wondering how I would accomplish this. I want to create a single FormType for the entity "User" with has an association mapping "Address" (OneToOne). How exactly do I create the form fields for the information in the associated Address Entity? Example entities: https://gist.github

[symfony-users] [symfony2] datetime widget single_text format

2011-06-16 Thread ibrows_symfony
Hi, I would like to change the format of the datetime widget to "dd.mm.". How can I do that? Actually, my field is implemented like this: $builder->add('startdatum', 'datetime', array( 'date_widget' => 'single_text', 'time_widget' => 'text')); I saw there is a parameter format, but it need

Re: [symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-15 Thread oscar balladares
Why when I asked same question no one could came up with a good answer like this one? [?] Thanks a lot. This will help me improve my current and first S2 production-meant app. [?] 2011/6/15 Jeremiah Dodds > > > On Tue, Jun 14, 2011 at 12:52 PM, waldo2188 wrote: > >> Hi, >> >> I wish to know ho

[symfony-users] [symfony2] Errors bubble to the main form

2011-06-15 Thread Rytis Daugirdas
Hello, I have a simple form with a few entity forms embedded into it. Validation seems to work, but all errors are reported as global (rendered via form_errors(form)). The same call for each field (form_errors(field)) does not render any errors at all. I did not set "error_bubbling" property anywh

Re: [symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-15 Thread Jeremiah Dodds
On Tue, Jun 14, 2011 at 12:52 PM, waldo2188 wrote: > Hi, > > I wish to know how i can execute some DQL(Doctrine Query Language) > from a unit test file. > > I just want to have access to my Entity for test some function. > > The unit test will be run with PHPUnit. > > use Symfony\Bundle\Framework

[symfony-users] Symfony2 [beta 4] + Doctrine 2 - Unit Test and EntityManager

2011-06-15 Thread waldo2188
Hi, I wish to know how i can execute some DQL(Doctrine Query Language) from a unit test file. I just want to have access to my Entity for test some function. The unit test will be run with PHPUnit. Big thanks for your help ! Waldo (Symfony beginner) -- If you want to report a vulnerability

Re: [symfony-users] [symfony2] Any advice/bundle to build a REST API

2011-06-15 Thread Christophe COEVOET
Le 15/06/2011 17:16, Thomas Parisot a écrit : Hello everybody, I'm planning to use Symfony2 to create a REST API, dealing with data in MongoDB and MySQL, with user quota (depending on the URL and its method). I have several questions: * what is the best strategy o simple routin

[symfony-users] [symfony2] Any advice/bundle to build a REST API

2011-06-15 Thread Thomas Parisot
Hello everybody, I'm planning to use Symfony2 to create a REST API, dealing with data in MongoDB and MySQL, with user quota (depending on the URL and its method). I have several questions: - what is the best strategy - simple routing/controllers - EverzetRestfulControllersBundle (

Re : Re: [symfony-users] [symfony2] file upload example?

2011-06-15 Thread Greg
is it working on BETA 3 ? In my case, $form->IsValid() is always false. I use an embedded form. -- 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"

[symfony-users] symfony2 - multiple forms on one page/one form for many entities

2011-06-15 Thread Fabian Blechschmidt
Hello List, I am new to symfony2 and I work on my first project with it. It is great and the documentation helped a lot, but for a few days, I have two problems I can't fix: 1) I have a table with settings. it consists of key-value-pairs and I want to show the 20 rows on one page and make it pos

[symfony-users] [symfony2] Validating non-entity fields

2011-06-15 Thread Rytis Daugirdas
Hello, What is the recommended way to validate form fields that do not belong to any entity? I don't see this documented anywhere. For example: $builder ->add('entity', new EntityType()) // validated by using constraints set for Entity ->add('foo', 'text'); // how do you add constraints here

[symfony-users] [symfony2] Missing options in select after block customization

2011-06-15 Thread Rytis Daugirdas
Hello, I customized "choice_widget" block by copying it from "div_layout.html.twig" to my own template file and adding it under twig/form/resources in config.yml. My customizations work fine when I add a "choice" field with the form builder, but now "country" fields are not rendered correctly (emp

Re: [symfony-users] [symfony2] file permissions, difference between app/console and apache

2011-06-14 Thread Mario Alberto Alvarez Garcia
Hi The solution to this problem was already created. Read this: http://symfony.com/doc/2.0/book/installation.html#configuration-and-setup There you will see how to setup your permissions to avoid "sudo chmod..." stuff every time. -- If you want to report a vulnerability issue on symfony, pl

[symfony-users] symfony2 beta4 Split 1 relation in 3 collections in a form?

2011-06-14 Thread ibrows_symfony
My model looks like this: Order --1m-- Address --1---m-- AddressType Actually there are 3 different AddressType. I would like to split the collection of Address in these 3 types in my form. Actually, I tried it with this code: $builder->add('send_addresses', 'collection', array( 'type

Re: [symfony-users] [symfony2] file upload example?

2011-06-13 Thread Fabien Potencier
On 6/11/11 12:24 PM, Ruben de Vries wrote: Are there any bundles on github that demonstrate a fileupload? I'm trying to implement handling the fileupload but I'm not really sure how to do it 'the symfony way' So some source code to dig through on github would be really helpfull (A) https://gi

[symfony-users] [symfony2] Mixing entity and non-entity fields in a single form

2011-06-12 Thread Rytis Daugirdas
Hello, I have a form type that extends Symfony\Component\Form\AbstractType. I use it with an entity object. I'd like to add additional fields and validation constraints to the form, but calling $builder- >add('extraField', ...) produces an error telling that added fields don't exist in the entity

Re: [symfony-users] [symfony2] file upload example?

2011-06-11 Thread oscar balladares
Thanks! 2011/6/11 Fabien Potencier > I'm working on updating the documentation to include an exmaple of a file > upload with and without Doctrine. > > It should be available on Monday. > > Fabien > > -- > Fabien Potencier > Sensio CEO - Symfony lead developer > sensiolabs.com | symfony.com | fab

[symfony-users] [Symfony2] [beta4] - routing.loader

2011-06-11 Thread Omar Ayoub-Salloum
Hello, I am trying to create a service that register routes taken from other services for my widget system. So what i did was to create a service and tag it with "routing.loader" I can see that the constructor of the class is being called but the "load" or the "supports" methods are not being call

Re: [symfony-users] [symfony2] file upload example?

2011-06-11 Thread Fabien Potencier
I'm working on updating the documentation to include an exmaple of a file upload with and without Doctrine. It should be available on Monday. Fabien -- Fabien Potencier Sensio CEO - Symfony lead developer sensiolabs.com | symfony.com | fabien.potencier.org Tél: +33 1 40 99 80 80 On 6/11/11 12

[symfony-users] [symfony2] file upload example?

2011-06-11 Thread Ruben de Vries
Are there any bundles on github that demonstrate a fileupload? I'm trying to implement handling the fileupload but I'm not really sure how to do it 'the symfony way' So some source code to dig through on github would be really helpfull (A) -- If you want to report a vulnerability issue on symfo

Re: [symfony-users] [symfony2] file permissions, difference between app/console and apache

2011-06-10 Thread oscar balladares
This is a common scenario in my case. The only advice I give you is to avoid working with other user than your regular user (don't work with the root account) if not, this will lead such file/dir permission issues. This is the thing. When you request a web url, i.e your app one, apache will crea

Re: [symfony-users] [symfony2] [beta4] ScopeWideningInjectionException in prod environment using php templates

2011-06-10 Thread Kris Wallsmith
Yes, please submit a pull request to fix this. Thanks, Kris On Friday, June 10, 2011 at 12:40 PM, pzwosta wrote: > Hi, > > with update to Beta 4 I get this Exception - only in prod environment (with > debug set to true on creating AppKernel). Without debug=true the server > returns an empty p

[symfony-users] [symfony2] [beta4] ScopeWideningInjectionException in prod environment using php templates

2011-06-10 Thread pzwosta
Hi, with update to Beta 4 I get this Exception - only in prod environment (with debug set to true on creating AppKernel). Without debug=true the server returns an empty page. Scope Widening Injection detected: The definition "assetic.helper.static" references the service "templating.helper.as

[symfony-users] [symfony2] file permissions, difference between app/console and apache

2011-06-10 Thread Ruben de Vries
I'm struggling a bit to get my linux file permissions setup in a manner where I can both use the CLI (app/console) and avoid issues with apache not being able to access files. The most often occuring problem is (ofcourse) the cache directory; If I do `app/console cache:clear` WITHOUTH `--no-warmu

Re: [symfony-users] [symfony2] many to one relation in form

2011-06-09 Thread Marcelo Prizmic
2011/6/8 Rigoberto Reyes sv > class ProductType extends AbstractType > { > public function buildForm(FormBuilder $builder, array $options) > { > $builder->add('name'); > $builder->add('price','money',array('currency'=>'EUR')) > $builder->add('description'); > $builder-

Re: [symfony-users] [symfony2] many to one relation in form

2011-06-08 Thread Rigoberto Reyes sv
class ProductType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder->add('name'); $builder->add('price','money',array('currency'=>'EUR')) $builder->add('description'); $builder->add('idCategory','entity',

[symfony-users] [symfony2] many to one relation in form

2011-06-08 Thread Thijs
Hi there, I'm new to Symfony and I'm playing with the product/category-example from the doctrine book entry. Everything works fine. A product belongs to one category. This relationship is defined with annotations in the entity objects. I'm creating a product-form like this: class ProductType ext

Re: [symfony-users] [symfony2:beta4] where has gone doctrine:generate:repositories ?

2011-06-08 Thread Matt Robinson
It's now built-in to the doctrine:generate:entities command - as long as you declare the repository class name in your @orm\entity declaration, generate:entities will also generate the repository. On 8 Jun 2011, at 12:05, spider wrote: > Hello, > > I just upgraded to BETA4 and tried to generat

[symfony-users] Symfony2: Recursive Form Errors

2011-06-08 Thread renegare
I am very new to this so hoping there is a simple solution. Using the Form Classes as advised in the symfony2 documentation, I need a way for $form->getErrors() to return ALL errors. I find it confusing that the $form->isValid() checks all children elements, but when you call $form->getErrors() it

[symfony-users] [symfony2] many to one relation in form

2011-06-08 Thread Thijs
Hi there, I'm new to Symfony and I'm playing with the product/category-example from the doctrine book entry. Everything works fine. A product belongs to one category. This relationship is defined with annotations in the entity objects. I'm creating a product-form like this: class ProductType ext

[symfony-users] [symfony2:beta4] where has gone doctrine:generate:repositories ?

2011-06-08 Thread spider
Hello, I just upgraded to BETA4 and tried to generate some repositories (defined in my XML mapping) but, wait, I cannot find anymore the command doctrine:generate:repositories Where has it gone? It's not a big problem, of course, cause the repository class is pretty simple to write by hand (a

[symfony-users] [symfony2] how i can run a post logout routine?

2011-06-07 Thread Diego Henrique Oliveira
Hey guys. I need to run a routine after the user made a logout, to register some informações about the session (duration and another stuff). How i can do it? Listeners and events? If so, i tried but i can't made it work just with the official documentation. Thanks Diego Oliveira -- If you want

[symfony-users] [symfony2] Problem with File type in form

2011-06-06 Thread Moises Gallego
Hi, I'm trying to make a form to add Info to an User with an avatar I'm created a file field and works correctly, I'm create the form at this way. $form = $this->get('form.factory') ->createBuilder('form', $userInfo) ->add('name', 'text') ->add('last_name', 'text') ->add

[symfony-users] [Symfony2] What is the simplest way to globally add a {_locale} prefix to every route ?

2011-06-06 Thread keymaster
There are a number of posts on this topic, and an issue was opened which was fixed by fabien in a recent update. Issues: https://github.com/symfony/symfony/issues/1187 Update: https://github.com/symfony/symfony/commit/c72537da6b906d9d7599a0ce00aead597804d0c7 It sounds like we need to import a

[symfony-users] symfony2 custom validation

2011-06-03 Thread cosmin
i am trying to build custom validation in symfony2 for passwords and username/email unique but i can`t figure out: how to access passconfirm property? hot to access the database? from within the validator class the documentation does not write about this:( -- If you want to report a vulnerabi

[symfony-users] symfony2: sharing global values between templates

2011-06-03 Thread Rytis Daugirdas
Hello, Is there a way to easily set a value in one template and make it available in another (both templates are included by the same layout)? For example, in a page template I want to set a string value representing the selected menu item and use this value in a mini- template that contains the

Re: [symfony-users] Symfony2 configuration types - which one to choose?

2011-06-03 Thread Christophe COEVOET
Le 03/06/2011 14:56, Dmitry Bykadorov a écrit : Hello all! What we have for configuration? - YAML (default in Symfony standard distribution) - XML (in my opinion most powerfull option - with validation via DTD& XSD but more complex to human) The configuration of bundles are validated whatever f

[symfony-users] Symfony2 configuration types - which one to choose?

2011-06-03 Thread Dmitry Bykadorov
Hello all! What we have for configuration? - YAML (default in Symfony standard distribution) - XML (in my opinion most powerfull option - with validation via DTD & XSD but more complex to human) - PHP (ugly but native )) - Annotations (looks very cool in file but... maybe hard to debug, no valida

[symfony-users] Symfony2 Resources in PDF or Other Print Friendly Format?

2011-06-02 Thread Damien
Has anybody packaged 'The Book' on Symfony2 into a printable format yet? I don't understand why there isn't an option to download this reference guide. I know it is moving fast but would be a great resource non-the-less. Anybody? -- If you want to report a vulnerability issue on symfony, please

[symfony-users] [Symfony2] - [beta3] Empty values on the page that exists in database

2011-06-02 Thread seven seven
Hi everyone, I am currently working on a basic CMS based on sf2. After upgrading from beta1 to beta3 a strange thing happened , some data doesn't appear on the page anymore; same database as in beta1. I must mention that data from the same entity , some works some does not, but every time I refres

Re: [symfony-users] symfony2

2011-06-01 Thread Nicolas de Saint Jorre
Hello, You CAN start with this tutorial: http://j-place.developpez.com/tutoriels/php/creer-premiere-application-web-avec-symfony2/ (only in French but it is very easy... Hope this help On Tuesday, May 31, 2011, salmyke wrote: > if there is a great tutorial for learning symfony2 from the beginnin

Re: [symfony-users] [Symfony2] Please help with Assetic

2011-05-31 Thread Christophe COEVOET
Le 30/05/2011 22:10, Anton Patrikeyev a écrit : I have little problem with AsseticBundle and don't know how to solve it. In my bundle I place my css files in *MyBundle/Resources/public/css/* Every time if I wont to change my css in public root I need to use symfony console *app/console assets:i

[symfony-users] symfony2

2011-05-31 Thread salmyke
if there is a great tutorial for learning symfony2 from the beginning to the Professionalism ? thank for all the gourp ! -- 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 Googl

[symfony-users] symfony2

2011-05-31 Thread salmyke
I need to know the real method to add in database by using orm doctrine? than for all groups ! -- 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" g

[symfony-users] [Symfony2] Please help with Assetic

2011-05-31 Thread Anton Patrikeyev
I have little problem with AsseticBundle and don't know how to solve it. In my bundle I place my css files in *MyBundle/Resources/public/css/* Every time if I wont to change my css in public root I need to use symfony console *app/console assets:install web* It works ok, but itisn't comfortable r

[symfony-users] Symfony2 Forms createView

2011-05-31 Thread Sebastian
Hi there, so I created a project using Symfony2Project. In my controller I am creating a form using a service. Service definition: form.search_form: class: MyNs\MyBundle\Form\SearchForm form.stock_search: class: Symfony\Component\Form\Form factory_service: form.facto

Re: [symfony-users] [Symfony2] Best way for using a base locale in URL (no I18N)

2011-05-31 Thread Christophe COEVOET
Le 31/05/2011 13:14, Mauricio Morales a écrit : Hi there community :) I'm trying to build a URL routing scheme for a web application that will be offered in different languages. It's a Symfony2 app and I've been wondering what the best way to address this situation is. What we need is as simple

[symfony-users] [Symfony2] Best way for using a base locale in URL (no I18N)

2011-05-31 Thread Mauricio Morales
Hi there community :) I'm trying to build a URL routing scheme for a web application that will be offered in different languages. It's a Symfony2 app and I've been wondering what the best way to address this situation is. What we need is as simple as this, i.e.: example.com/es/services example.c

  1   2   3   4   5   6   7   8   9   10   >