[symfony-users] Re: How to automatically add stars on required fields using sfForm in Symfony 1.2

2009-08-31 Thread Thomas Rabaix
ho ho !! a third solution ;) The solution is mainly : - call a static method - it goes through the widgetSchema recursively - update the label to be an *object* and not a sting. - echo $label will invoke the __toString method - the __toString format the label with default string :

[symfony-users] Re: filter=filter does not work in admin

2009-08-31 Thread Ethan Farmer
I'm a little late to the party here but I had the same problem and think I've found a solution. I have a list of employers and on that list I want the user to be able to drill down to the employer's employees. To accomplish this I needed to redirect to a separate module and apply a filter. The

[symfony-users] How to create an action to dump my DB with mysqldump

2009-08-31 Thread Lorand Tamas
Hi, I want to create an action in my backend application to execute the mysqldump command. Like system(mysqldump ). If it is possible, how can i download the generated file to the computer which will execute that action. Cheers, Lorand Tamas

[symfony-users] Turn off web_debug for certain templates

2009-08-31 Thread Kropp, Henning
Hi list, is it possible to turn off web_debug for certain templates in a module, but using web_debug for the rest of the apps modules? How can this be configured? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[symfony-users] Re: Turn off web_debug for certain templates

2009-08-31 Thread harryjekyll
Here you can see all the details: http://www.symfony-project.org/book/1_2/16-Application-Management-Tools#chapter_16_sub_web_debug_toolbar and yes, it is possible: sfConfig::set('sf_web_debug', false); On Aug 31, 2009, at 4:31 AM, Kropp, Henning wrote: Hi list, is it possible to turn

[symfony-users] Re: How to create an action to dump my DB with mysqldump

2009-08-31 Thread Szabolcs Heilig
Hi, If you execute mysqldump on your webserver with system() command, you will have the dump already on your webserver. Or you want to download the dump to the client? I want to create an action in my backend application to execute the mysqldump command. Like system(mysqldump ). If it is

[symfony-users] Re: How to create an action to dump my DB with mysqldump

2009-08-31 Thread Lorand
Hi, Szabolcs! I tried something like this: public function executeBackupDb() { $backupFile = '/var/www/dbname/backup'. date(Y-m-d-H-i-s) . '.gz'; $command = mysqldump --opt -uuser -ppass dbname | gzip $backupFile; system($command); } but the file wasn't created because the

[symfony-users] Re: How to create an action to dump my DB with mysqldump

2009-08-31 Thread Lorand
I am created a link to that file in the action's template. It's ok now. On Aug 31, 11:54 am, Lorand tloran...@gmail.com wrote: Hi, Szabolcs! I tried something like this:   public function executeBackupDb()   {     $backupFile = '/var/www/dbname/backup'. date(Y-m-d-H-i-s)  . '.gz';    

[symfony-users] Re: illegal offset type

2009-08-31 Thread krishan
I guess, you will require to create a __toString or __string function which will return the name instead of id's for choice menus. Additionally check if you tables have some data to show in choice menus. the table which is available as choice data to other table should have some data or ___string

[symfony-users] Re: How to automatically add stars on required fields using sfForm in Symfony 1.2

2009-08-31 Thread Thomas Rabaix
No, the translation callback is kept. http://trac.symfony-project.org/browser/plugins/swFormExtraPlugin/tags/VERSION_1_2_0/lib/form/swFormHelper.class.php#L82 On Mon, Aug 31, 2009 at 11:08 AM, Sid Bachtiar sid.bacht...@gmail.comwrote: Will that affect i18n translation? On Mon, Aug 31, 2009

[symfony-users] Can't get Doctrine Nested Set on an aliased multi root column to work

2009-08-31 Thread Georg Gell
Hello, I am trying Doctrine for a new project, so my Doctrine level is newbie. I would like to have nested albums with one root album per client, so I set up the table like this: Album: actAs: NestedSet: {hasManyRoots: true, rootColumnName: client_id } columns: path: { type:

[symfony-users] Get all models that are attached to a particular behavior

2009-08-31 Thread Kieu Anh Tuan
Hello, I'm working on a project (symfony 1.0 + Propel 1.2) that uses several behaviors such as commentable and taggable. I would like to know if there is a way to get all models that are attached to a particular behavior. My idea was to get all available models in the project and then check every

[symfony-users] Running symfony in php safe_mode

2009-08-31 Thread Darren Cadwallader
I'm trying to install symfony on a shared host which runs php in safe mode (nearlyfreespeech.net). I have no access to php.ini and cannot sudo. CLI php is at version 5.2.9, in the browser it shows as 5.2.10. I've followed the instructions in the getting started guide (http://

[symfony-users] Re: illegal offset type

2009-08-31 Thread krishan
how did you solve, share... so that everybody can get to know On Aug 31, 2:55 pm, asim nizam asim...@gmail.com wrote: Thanks i have solved problem!! On Mon, Aug 31, 2009 at 3:47 PM, krishan milepe...@gmail.com wrote: I guess, you will require to create a __toString or __string function

[symfony-users] sfForm-save() for an update

2009-08-31 Thread krishan
Friends I am facing a problem for updating a record in table in many steps. In each step I save the submitted data. This is my code $this-form = new ProfileForm(); $this-form-bind($request-getParameter($this-form-getName())); if ($this-form-isValid()) { $this-form-setOption('id',

[symfony-users] Re: mysqli + doctrine

2009-08-31 Thread Masaki
check this: http://www.symfony-project.org/doctrine/1_2/en/02-Connections Hmm, the description of supported drivers of symfony-project.org is different from the one of doctrine-project.org. As you say, There is no PDO_MYSQLi(http://php.net/manual/ pdo.drivers.php) and mysqli is not supported

[symfony-users] Re: sfForm-save() for an update

2009-08-31 Thread Alexandre SALOME
2 solutions : - check the id field is set and be sure it is rendered in form (hidden field : $form-renderHiddenFields()) - Add id to parameters : $this-form-bind(array_merge(array('id' = $id), $request-getParameter($this-form-getName(; Good luck 2009/8/31 krishan milepe...@gmail.com

[symfony-users] Re: Many to Many relationships, how to delete them?

2009-08-31 Thread pcummins
Thomas, If you have defined the many to many relationship in your schema.yml between the 1:M tables the admin generator will automatically adjust the doSave methods of your Base*Form.class.php files to handle the relations. Heres example of schema and resulting code esulting code. (BTW, this

[symfony-users] Re: How to automatically add stars on required fields using sfForm in Symfony 1.2

2009-08-31 Thread Fabrice B
ho ho !! a third solution ;) The solution is mainly : call a static method it goes through the widgetSchema recursively update the label to be an *object* and not a sting. echo $label will invoke the __toString method the __toString format the label with default string : %s

[symfony-users] sorting custom columns

2009-08-31 Thread Abraham
Hello everybody, i'm using symfony 1.2.8 with Doctrine and i want to add sorting functionality to those columns in the list view that aren't real columns, i found this help: http://redotheweb.com/2008/09/25/sorting-by-custom-column-in-the-symfony-admin-generator/ and i saw the light shinning at

[symfony-users] Re: sorting custom columns

2009-08-31 Thread rheenen
I would hope that DbFinder works with Doctrine? Just found it myself and was really getting excited... The ReadMe.txt seems to state it should support Doctrine anyway. Could you perhaps, to save me time, pinpoint exactly what it does not support with Symfony 1.2? Fixing DbFinder to work with

[symfony-users] Re: sorting custom columns

2009-08-31 Thread rheenen
What exactly is not working with Symfony 1.2 and Doctrine? The readme.txt of DbFinder seems to state it should work... I am willing to help out to get DbFinder to work with Symfony 1.2 where it's broken as I need to it too. On Aug 31, 8:20 pm, Abraham amontil...@gmail.com wrote: Hello

[symfony-users] Re: sorting custom columns

2009-08-31 Thread Abraham Montilla
Yes, it mostly works, rheenen. But when you try to use the DbFinderAdminGenerator class in the generator.yml file the project crashes due to the inexistence of the sfDoctrineAdminGenerator class (deleted in symfony 1.2), and that's my problem, i tried changing the class reference in

[symfony-users] Re: sorting custom columns

2009-08-31 Thread Martijn van Rheenen
Thanks for the answer. At my work I have an active project in which I am trying to use Symphony as the be-all is-all solution. Using your hints I will be looking further into this. As soon as I have found a solution, I will get back to you. On Mon, Aug 31, 2009 at 10:47 PM, Abraham Montilla

[symfony-users] Re: Is it possible to get PHP arrays through Symfony's url_for() helper?

2009-08-31 Thread Sid Bachtiar
So if I need one variable to hold several values what I should I do? Is there a way to get a PHP array through an URL when using Symfony? I can answer this part, yes, you can retrieve array through an URL http://myproject.local/module/action?a[]=1a[]=2 You just retrieve it by $a =

[symfony-users] Re: Is it possible to get PHP arrays through Symfony's url_for() helper?

2009-08-31 Thread Jake Barnes
After a bunch of searches on Google, I found that we could do this: ?php echo link_to('All Current Students', 'content/search', array ('query_string' = 'uva_status[]=Undergrad studentamp;uva_status[] =Grad Student/Postdoc')) ? It is hard to find the documentation on this stuff, but there it

[symfony-users] how do I found our if anything has been added to a Criteria object? How do I find the length of the current query?

2009-08-31 Thread Jake Barnes
Untill we get Lucene working, I was going to write some simple code that would allow very simple searches. So I tried this: $this-listOfMembersWhoMeetSearchCriteria = array(); $c = new Criteria(); $uvaStatusArray = $request-getParameter('uva_status'); if

[symfony-users] Re: illegal offset type

2009-08-31 Thread asim nizam
yes sir it was to __toStrig method and you discusssed below clearly thanks. On Mon, Aug 31, 2009 at 5:07 PM, krishan milepe...@gmail.com wrote: how did you solve, share... so that everybody can get to know On Aug 31, 2:55 pm, asim nizam asim...@gmail.com wrote: Thanks i have solved

[symfony-users] Re: how do I found our if anything has been added to a Criteria object? How do I find the length of the current query?

2009-08-31 Thread Frank Stelzer
Mmmh, why not this way? --- $this-listOfMembersWhoMeetSearchCriteria = array(); $c = new Criteria(); $uvaStatusArray = $request-getParameter('uva_status'); if (is_array($uvaStatusArray)) { for ($i=0; $i count($uvaStatusArray); $i++) { if ($i 0) {