[symfony-users] Manually overriding values for form submission

2011-05-02 Thread OnDistantShores
I'm still a Symfony newbie. I'm using the generate-module call to create a form for my model and that's working fine. However I want to manually override some of the values from the form submission, to process them a bit on the backend before saving them. What is the best way to do this? Before

Re: [symfony-users] Manually overriding values for form submission

2011-05-02 Thread Erkhembayar Gantulga
Hi *OnDistantShores* You can override Bind method in your Form : public function bind(array $taintedValues = null, array $taintedFiles = null) { $taintedValues['your override form field'] = 'blah'; parent::bind($taintedValues, $taintedFiles); } and Also, you can change

[symfony-users] Date Field

2011-05-02 Thread lidaa
Hello How to customize the separator between the three types of lists: DateType. 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 the Google Groups symfony users

Re : [symfony-users] Date Field

2011-05-02 Thread Louardi Abdeltif
Hello, are you tried with format option?!try this $builder-add('MyDATE', null, array('format' = \IntlDateFormatter::SHORT)); De : lidaa adilo...@gmail.com À : Symfony users symfony-users@googlegroups.com Envoyé le : Lundi 2 Mai 2011 10h05 Objet :

[symfony-users] Symfony2 Beta1 - git branch

2011-05-02 Thread Robert Gründler
Hi all, does the master branch on https://github.com/symfony/symfony correspond to the symfony version which works with the Beta1 Standard Distribution (http://symfony.com/download) ? And is the current development taking place in that master branch too ? -robert -- If you want to

[symfony-users] [sf2][new Forms] Custom Labels in FormBuilder

2011-05-02 Thread Conrad
I would like to customize my labels for my forms using the 'label' option of a field, unfortunately this doesnt work: http://pastie.org/1856300 The result is 'user_firstname' for example instead of 'Firstname' or any of the other ones.. (the desired one would be my translation string in line 10)

[symfony-users] [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread seven seven
Hi everyone, I am currently facing one annoying issue . Everytime I insert something into mysql DB using *AdminBundle *I have a quote escape ( ' or / becoming \ \' \/ ) . I suspect this is because my provider has *magic_quotes_gpc = on* and he don't want to set it to off. The question I have ,

[symfony-users] Re: [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread Carl
Try putting this in your .htaccess file: php_value magic_quotes_gpc off This may or may not work on your host. It depends on how things are setup. But it can't hurt to try. If you get an internal server error after adding that, then it's something that will need to be changed in php.ini. --

[symfony-users] Re: Symfony2 ACL Performance Question

2011-05-02 Thread winzou
Any news from both of you? I'm very interested as well. What's the best practice here? On 16 avr, 06:45, Tim Nagel t...@nagel.com.au wrote: Normally we'll expect the developer to implement their own controllers/views if they need anything more advanced than what we're providing at the moment,

Re: [symfony-users] Re: [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread seven seven
Thanks for your quick reply ! Yes I tried this already but it seems that the settings are not meant to work this way, it troughs a 500 internal error. I know there is a config available to put a php.ini file with magic_quotes_gpc = off , but this being a by folder setup it means I should put this

[symfony-users] [sf2] Creating ACL - Best practice ?

2011-05-02 Thread winzou
Hi, I'm setting up a real secure area, with secured domain objets. Thanks to the doc, here is the process of granting owner access : if ($form-isValid()) { $entityManager = $this-container- get('doctrine.orm.default_entity_manager'); $entityManager-persist($comment);

Re: [symfony-users] Re: Symfony2 ACL Performance Question

2011-05-02 Thread Gediminas Morkevicius
I think when user logs in, his ACL tree should be stored in his session. This way it will issue only a single query on successful login. It may require extra time on making acl tree compact with role inheritance and other fancy stuff. On Mon, May 2, 2011 at 3:13 PM, winzou

Re: [symfony-users] Symfony2 Beta1 - git branch

2011-05-02 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi robert, the master branch is where development takes place, so it is the latest version. (except for development branches when some area is heavily reworked - the rest comes in mostly with pull requests) the beta1 distribution includes a slightly

Re: [symfony-users] Varnish with ESI and Symfony2 Beta1

2011-05-02 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i while ago (back in march) i had tried to use ESI and never managed to have symfony render an esi:include tag. i gave up at some point, not sure if we do something wrong or if symfony has a bug. you do tell varnish to send the esi capability headers

[symfony-users] [Symfony2][Doctrine2] Problem with UML Composition.

2011-05-02 Thread JeanChristophe
Hello all, I like to model a floor in a building (Merise): [IMG]http://s1.postimage.org/6ljrxsj3p/MCD.png[/IMG] UML equivalent: [IMG]http://s1.postimage.org/6ljtlbvlh/UML.jpg[/IMG] Problem: how i can design this concept with annotations classes ? It is impossible ? Thanks a lot,

Re: [symfony-users] Re: [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread Carl
Dang, that's a shame that disabling it in your .htaccess file doesn't do the trick. I was hoping it would work since that's the quickest and easiest solution without editing php.ini. And it's guaranteed to shut it off. I assume that your web host can't/won't disable this option on your account?

Re: [symfony-users] [Symfony2][Doctrine2] Problem with UML Composition.

2011-05-02 Thread Luis Cordova
hi JeanChristophe what software or tool did you use for your diagrams here? Thanks, Luis On Mon, May 2, 2011 at 9:21 AM, JeanChristophe javascrip...@gmail.com wrote: Hello all, I like to model a floor in a building (Merise): [IMG]http://s1.postimage.org/6ljrxsj3p/MCD.png[/IMG] UML

[symfony-users] Re: [Doctrine2] Problem with UML Composition.

2011-05-02 Thread spike3111
Look at this link http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html Bonne continuation -- 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] Re: [Doctrine2] Problem with UML Composition.

2011-05-02 Thread Luis Cordova
I meant the IDE to make charts like that, the graphics On Mon, May 2, 2011 at 10:33 AM, spike3111 gilles.gauthie...@gmail.com wrote: Look at this link http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html Bonne continuation -- If you want to report a

[symfony-users] Re: [Doctrine2] Problem with UML Composition.

2011-05-02 Thread JeanChristophe
@Luis: I use Cecima Win'Design for Merise model and StarUML for UML Model. Cecima Win'Design can also draw UML Model but i haven't the commercial licence... :'( @Spike3111: I create a topic in the french group :) -- If you want to report a vulnerability issue on symfony, please send it to

Re: [symfony-users] Re: [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread Gábor Fási
By the time your script starts running, the variables are already escaped, so that ini_set won't help. On Mon, May 2, 2011 at 16:27, Carl carl.par...@gmail.com wrote: Dang, that's a shame that disabling it in your .htaccess file doesn't do the trick. I was hoping it would work since that's the

Re: [symfony-users] Re: [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread Carl
Good point... -- 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

Re: [symfony-users] Re: [symfony2] set magic_quotes_gpc to off on home level ?

2011-05-02 Thread seven seven
Hi Carl, Thanks for your response ! Actually the magic_quotes_gpc cannot be changed with init_set after 4.2.3 because is a PHP_INI_PERDIR according to this post http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting and php.net . Again on to the same post I found

[symfony-users] Security - getToken to find authenticated users while outside of secured firewall

2011-05-02 Thread danielholmes
Hi All, I'm having a problem working with the security layer and i'm pretty sure its because i don't understand the big picture in relation to security. I found one other user who was having the same problem, but they didn't receive an answer:

[symfony-users] {% trans test %} doesn't work on beta1

2011-05-02 Thread John Blobsmith
Hi, I used in PR12 this code in twig template {% trans test %} but in beta1 it doesn't work. The error message : Unexpected token. Twig was looking for the with or from keyword in BundleCreatorBundle::layout.html.twig. Do you know where is the problème ? -- If you want to report a

[symfony-users] symfony2 + phpunit + crawler/uri + mod_rewrite

2011-05-02 Thread DanielTogni
Hi all, I am trying to use phpunit with symfony2. All basics work fine. I tried to use the DOMCrawler::link + Client::click(), as in examples, but it does not perform the apache/ mod_rewrite changes. My app runs on localhost/symfony/app.php (mod_rewrite changes all /* links to

Re: [symfony-users] Doctrine:generate:entities

2011-05-02 Thread Marco Pivetta
Entities are not generated by their setters or getters :) Please take some time to look at the Object Hydrator ;) Marco Pivetta @Ocramius http://twitter.com/Ocramius http://marco-pivetta.com On 30 April 2011 02:34, sergio sergio.pe...@albatronic.com wrote: Regarding

[symfony-users] Embedded form as optional

2011-05-02 Thread yethee
I have a two models, example: class ModelA { /** * @var bool */ public $enabled; /** * @var ModelB */ public $child = null; } class ModelB { /** * @assert:NotBlank */ public $foo; } And forms for them: class ModelAFormType extends

[symfony-users] Upgrade Symfony from 1.4.4 to 1.4.11 generates error

2011-05-02 Thread pixworld
Hi, I've created a folder in /lib/vendor call symfony_last and put the last version of the core. I've change the apache configuration. I've made a clear cache as written in my book. The debug bar say I'm under Symfony 1.4.11 but I have an error of routing. After search, I've seen

Re: [symfony-users] Doctrine:generate:entities

2011-05-02 Thread Joao Daniel Togni
Hi, You are not supposed to change manually the id. Doctrine manages it for you. It will update the id when you fetch data or persist/flush, for instance. Regards, Daniel On Sat, Apr 30, 2011 at 4:16 AM, A A kaupa...@gmail.com wrote: You should determine entity by finding it first ($entity =

[symfony-users] Re: Re : Re: Upload file in symfony2

2011-05-02 Thread Treur
FileField automatically renames the file to a name without extension. You should manually rename the file with the appropriate extension. Using the extension form the original filename from the browser is unsafe and should be avoided. On Apr 25, 12:56 pm, symfonyMan ezziani.cha...@gmail.com

[symfony-users] Re: Date Field

2011-05-02 Thread Christophe Willemsen
Hi, You can specify the pattern to be used when building your form, but there is not working at this time or you have to modify the Symfony Core DateType field class, I've reported this bug here : http://trac.symfony-project.org/ticket/9736 Infos over the DateType field reference :

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

2011-05-02 Thread Alexander Pilipenko
Hi all. Today I've encountered this problem with recursive validation and it seems this thread is the only one, where this question is being discussed. On Apr 18, 9:00 pm, whynotmatt m...@mjohnston.com wrote: On a web form, for optimization reasons, we don't need to submit all fields from the

[symfony-users] Re: overriding model-createQuery causes The default context does not exist. on doctrine:data-dump

2011-05-02 Thread Hesky
Hi, Have you come up with any solution to this Jochen? or anyone please? thanks Hesky -- 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

[symfony-users] Re: Unrecognized options secret under framework.csrf_protection

2011-05-02 Thread xaben
In order to remove the warning add: secret=%csrf_secret% at the end of parameters.ini This is a temporary fix, assuming the naming convention will be sorted out in a future version you will be able to remove this when it gets fixed. On 29 апр, 10:13, Erkhembayar Gantulga

Re: Re : [symfony-users] Date Field

2011-05-02 Thread Christophe Willemsen
Hi, You can specify the pattern to be used when building your form, but there is not working at this time or you have to modify the Symfony Core DateType field class, I've reported this bug here : http://trac.symfony-project.org/ticket/9736 Infos over the DateType field reference :

[symfony-users] [Symfony 2] Login using built-in security bundle

2011-05-02 Thread Filipe La Ruina
Hey Guys, I'm doing a project using Symfony 2 and the project involves '/' as being an login/register page and all the other pages require a logged user (it will be an entity) I'm reading the book but still I think the security part is not really clear for me. I see by the demo that I can have

[symfony-users] [sf2] ACL for groups of entities

2011-05-02 Thread Paul Dugas
Can SF2's ACLs be used to manage access to entities based on their membership in groups? Say I have both User and Widget entities assigned to Category entities. Can the ACL system be used to only allow access to Widget entities in Categories the User is assigned to? If so, can someone point me

[symfony-users] [Symfony2] PR11 to Beta1 - Tests using PDO_sqlite now fail

2011-05-02 Thread Donald
I'm in the middle of upgrading my project to use Symfony 2 Beta 1, from it's current version of PR11, and I've run into a problem with the tests that I can't work out. I use pdo_sqlite for my tests, and create the schema in the setup method of each test. This would work fine in PR11, but in Beta

Re: [symfony-users] {% trans test %} doesn't work on beta1

2011-05-02 Thread Daniel Gomes
Have you read the update.md file? Line 93: * The `trans` tag does not accept a message as an argument anymore: {% trans foo %} {% trans foo %} Use the long version the tags or the filter instead: {% trans %}foo{% endtrans %} {{ foo|trans }} Hope it helps, Daniel Gomes

[symfony-users] Re: PR11 to Beta1 - Tests using PDO_sqlite now fail

2011-05-02 Thread Donald
With further testiing, I've verified the following: 1. The Controller see's no tables at all. Printing the results of $em- getConnection()-getSchemaManager()-createSchema() in testSomething() outputs the expected schema, whereas running the same line in the action for /things/1.html outputs an

[symfony-users] Re: Getting application config item within task's execute() function

2011-05-02 Thread pantherse
Well, I finally solved my problem. Basically, use sfConfig::get() just as one would from within the application itself. Here's a post explaining how it works for other symfony newbies (and an extra tip on how to flip-flop between environments):

Re: [symfony-users] [sf2] Creating ACL - Best practice ?

2011-05-02 Thread Tim Nagel
I've been working on a solution to this issue in FOS\CommentBundle, we've created object managers, and wrap those managers with AclManager instances that manage the Acl. https://github.com/FriendsOfSymfony/CommentBundle Entity\CommentManager is the usual ORM manager which deals with interaction

[symfony-users] FormComponent Question

2011-05-02 Thread Geoff G
In the book, there is the following example: [code] namespace Acme\StoreBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Acme\StoreBundle\Entity\Product; class DefaultController extends Controller { public function indexAction() { // create a