[symfony-users] problem accessing parameters defined in routing file

2010-09-29 Thread Shihab KB
Hi, I have an issue. The parameters defined in the “param:” of routing.yml is not getting in the model class (here CommentsTable). Can you suggest a method to solve this issue? The below are my routing entries. # Get comments with default page settings api_common_get_comments: url:

[symfony-users] Other in sfWidgetFormI18nChoiceCountry

2010-09-29 Thread HAUSa
Is there a way to define an other country in the sfWidgetFormI18nChoiceCountry? For example, I support 5 countries by choice. The last option is always other. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message

[symfony-users] Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread torok84
[ In the real application I would have something like LEAST(user.points, 300) ] Hello, I do not understand very well how the set() function works I tryed the following code: $q = Doctrine_Query::create() -update('User u') -set('u.points', 'LEAST(200,100)'); echo $q-getSqlQuery(); But the

[symfony-users] Re: Live symfony tutorial

2010-09-29 Thread guiguiboy
Have you planned doing the same for sf2 ? On 29 sep, 05:21, f1gm3nt f1gm...@gmail.com wrote: I just want to spark up a discussion on what I hope to be very informative for the symfony community. I will be giving a live symfony 1.4 tutorial. This will air on uStream.tv (http://www.ustream.tv/

[symfony-users] Re: Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread torok84
Workaround: $conn = Doctrine::getConnectionByTableName('User'); $conn-exec('UPDATE user SET points = LEAST(200,300)'); Any chance this can be done using Doctrine? Paolo On Sep 29, 2:56 pm, torok84 toro...@gmail.com wrote: [ In the real application I would have something like

[symfony-users] Re: Live symfony tutorial

2010-09-29 Thread f1gm3nt
Sure, if this event goes well and the community wants me to do another one on Symfony 2, I'd be more then happy to do it =) On Sep 29, 9:00 am, guiguiboy guillaume.bre...@gmail.com wrote: Have you planned doing the same for sf2 ? On 29 sep, 05:21, f1gm3nt f1gm...@gmail.com wrote: I just

[symfony-users] Re: Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread guiguiboy
Be careful, LEAST is not SQL standard, this means if you change you database server, you may (will) encounter problems. Why not doing it with PHP ? You have the min function : http://fr.php.net/min On 29 sep, 15:05, torok84 toro...@gmail.com wrote: Workaround: $conn =

[symfony-users] Re: Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread torok84
I suspected that, anyway I guess if the DB changes some other query will need to be rewritten. I choose not to use PHP because it would be tens of times slower. (Using PHP would mean to fetch all the records, create relative doctrine objects, modify them and save back...). Paolo On 29 Set,

[symfony-users] Re: column_aggregation.. change type programatically?

2010-09-29 Thread Grzegorz Śliwiński
Try running an update query against that row. It should be possible to change type that way. On 28 Wrz, 17:31, Gustavo Adrian comfortablynum...@gmail.com wrote: Hi there, Is there a way to change an object's type programatically? I mean, I have the type field on my form so I can change the

[symfony-users] Re: enter comments on a blog in the same page

2010-09-29 Thread Grzegorz Śliwiński
have you tried to use plugins for that? If you'll create form object in an article action, and you'll try to display that form in article's template, it should be possible to include form. On 28 Wrz, 20:30, eduard eduard.sa...@gmail.com wrote: Hy,      I'm trying to do this: I have a article,

Re: [symfony-users] Re: enter comments on a blog in the same page

2010-09-29 Thread Gustavo Adrian
As Grzegorz said, a plugin would help a lot. vjCommentPlugin is a nice one: vjCommentPlugin http://www.symfony-project.org/plugins/vjCommentPlugin 2010/9/29 Grzegorz Śliwiński fi...@fizyk.net.pl have you tried to use plugins for that? If you'll create form object in an article action, and

Re: [symfony-users] Re: column_aggregation.. change type programatically?

2010-09-29 Thread Gustavo Adrian
Hi! Yes, I was thinking on following that approach but I don't want to do it for every form I use with this model. I tried to do that update on the a preSave event but it doesn't work either (I don't do it on the postSave because at that time I've lost the value of the type I want). I'll try

Re: [symfony-users] Re: column_aggregation.. change type programatically?

2010-09-29 Thread Gustavo Adrian
Yes, finally I solved the problem making an UPDATE on the doSave method of my form, AFTER calling the parent::doSave method. It's not elegant, but it works. If someone has a better solution, please, tell us! I share what I did in case someone needs it: protected function doSave( $con = null )

[symfony-users] I18n et column Slug

2010-09-29 Thread Christophe
Bonjour, Je bute sur un souci commun mais dont aucun post ne donne de solution. J'ai une table internationalisée : actAs: NestedSet: hasManyRoots: true rootColumnName: root_id I18n: fields: [titre,is_activated] actAs: Sluggable: { fields: [titre],

[symfony-users] sfDoctrinePager - sorting items

2010-09-29 Thread coda
Hello, I'm following Jobeet tutorial and want to add some sorting options to the sfDoctrinePager That's my code: actions: public function executeIndex(sfWebRequest $request) { $this-jobs_table = Doctrine::getTable('JobsItem'); $this-pager = new sfDoctrinePager( 'JobsItem',

[symfony-users] Anyone ever used nu_coder to encode symfony project

2010-09-29 Thread xhe
If I use nucode to encode symfony project, it initially works, but once I cleared cache, it no longer work. Anyone has similiar experience? How can you encode your symfony project? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You

[symfony-users] Symfony2: ChoiceField() and Entities

2010-09-29 Thread Dennis Jacobfeuerborn
I'm finally getting to a point where I have a basic skeleton for an application with symfony2 running. Right now I can CRUD hosts and system individually. What I'm now trying to accomplish is to associate any number of systems with a particular host. I've managed to set this up on the entity level