[symfony-users] Class autoloading namespace conflict

2011-01-02 Thread benze
Hi, I love symfony's class autoloading feature ... most of the time. I'm really hung up right now over the need of coming up with a unique class name everytime, even if it is within a different module. For example, I have a DeleteAction in a profile module, and also want a DeleteAction in an

[symfony-users] Best practice to allow for Action reuse?

2011-01-02 Thread benze
Hi, I'm trying to figure out the best way to reuse an action, and am having difficulty figuring that out. Specifically because my action seems to be tied to the response. For instance, I have a delete action that I want to call from within several different web pages, however, depending on

[symfony-users] Form not rendering with correct data from Boolean field.

2011-01-02 Thread Scott O'Brien
Howdy, I'm having trouble with one of my fields in a form. I've got a section of code in my form php $isCitizen = array( True = 'Yes', False = 'No', ); $this-widgetSchema['citizenship'] = new sfWidgetFormChoice(array( 'choices' =

[symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Gabriel Petchesi
Look into Symfony events and Mixin mechanism: http://blog.sznapka.pl/symfony-mixins-how-to-extend-symfony-core-classes-without-inheritance/ older post from the symfony 1.0 era, not sure if this still applies: http://www.mail-archive.com/symfony-users@googlegroups.com/msg04765.html gabriel --

Re: [symfony-users] Best practice to allow for Action reuse?

2011-01-02 Thread Svetoslav Shterev
On Sat, 2011-01-01 at 23:36 -0800, benze wrote: Hi, I'm trying to figure out the best way to reuse an action, and am having difficulty figuring that out. Specifically because my action seems to be tied to the response. For instance, I have a delete action that I want to call from within

Re: [symfony-users] Best practice to allow for Action reuse?

2011-01-02 Thread Gareth McCumskey
Quite simply, an action can interrogate where it was called from, what post/get data exists as well as what session data exists. All of this can be used to help determine what function an action should perform. Once you can determine inside an action what you need to do you can also load different

Re: [symfony-users] Need to hide sfWidgetFormDoctrineChoice dropdown when editing existing record

2011-01-02 Thread Better Brief
On 25 Dec 2010, at 23:20, dmitrypol dmitry...@gmail.com wrote: I have a form where users can declare their preferences (pref1, pref2, pref3, etc) and importance of each one (very important, somewhat important, not important). Once they declare the preference they should be able to change

[symfony-users] Re: [symfony-devs] Easy migration from Symfony 1.x to 2.0

2011-01-02 Thread ftorresan
Thank you very mutch for reply, Is there a place where I can find a roadmap for Symfony2? I will try to develop a sample app and then I will decide what to do. Best regards. On 23 Dic, 18:07, Gustavo Adrian comfortablynum...@gmail.com wrote: I'm finishing my first serious project with Symfony 2

[symfony-users] [Symfony2] Many questions (cache, Doctrine)

2011-01-02 Thread elNiño
Documentation is very poor now, so I have some questions: 1) Cache - is it working for you? How can I simply cache action for 60 seconts (I don't want to execute any PHP/SQL code - simply cache HTML output). 2) How can I add to website some independant blocks (eg. in sidebar) for many actions. I

[symfony-users] Re: [Symfony 2] Questions about Forms and EntityManager

2011-01-02 Thread François
Perfect, I dunno why I havn't think about it but it's just what I needed. Thanks ! On Dec 30, 1:14 am, Bernhard Schussek bschus...@gmail.com wrote: You can simply create a constructor that accepts the EntityManager as parameter, no? Bernhard -- Software Architect Engineer

[symfony-users] [Symfony2] Registry

2011-01-02 Thread elNiño
Is there any registry feature in Sym2? I want to put there EntityManager to use it in entities. -- 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] Help Optimization Loading Symfony

2011-01-02 Thread Wizermil
Hi, My company started a web service project using symfony 1.4.x + Doctrine + MySQL (FYI: I upgraded the project to 1.4.8) few months ago. Just to let you know what we are doing it's kind of openfeint (http:// openfeint.com/) webservices to handle a community, leaderboards, game profile (level,

[symfony-users] Re: symfony and memcache doubt

2011-01-02 Thread Wizermil
Hi Shihab, I think you can use memcached or APC cahce system, it's available in doctrine: http://www.doctrine-project.org/documentation/manual/1_1/en/caching To implement it in your symfony project you just have to let doctrine knows that it can use a cache system 1. In

Re: [symfony-users] Re: sfWidgetFormChoice

2011-01-02 Thread Emmanuel de Carvalho Garcia
I tryed this. Stored Array string on my database. Em 30/12/2010, às 10:58, Massimiliano Arione escreveu: On 29 Dic, 17:58, emanu.ti emanu...@gmail.com wrote: Hi, I want to use sfWidgetFormChoice with multiple = true parameter. Here is my code: You need to set multiple option in your

[symfony-users] Two different objects on the same list

2011-01-02 Thread Greg
Hi everybody, I want to put on the same list two different objects that have the same property. The two objects are Plan and Event, here is a sample of the schema.yml (i'm using doctrine) : Plan: actAs: Timestampable: ~ columns: holder_id: { type: integer, notnull: true }

[symfony-users] Re: doctrine many-to-many relation

2011-01-02 Thread woolfas
Description of M:M relation you can find in this page: http://melikedev.com/2009/12/09/symfony-w-doctrine-saving-many-to-many-mm-relationships/ Full schema.yml configuration reference for doctrine you can find here: http://www.symfonyreference.com/schema Good luck! On Dec 31 2010, 6:41 pm,

[symfony-users] Spreading Symfony2 application (services) across cloud with Gearman

2011-01-02 Thread Ville Mattila
Hi there, I have been thinking (well - it's not always a good idea ;) some different schemes to deploy a large scale Symfony2 application in a cloud environment and spreading application's components across the network in different hosts. Gearman (www.gearman.org) is very good tool to delegate

[symfony-users] Symfony Console Component

2011-01-02 Thread umpirsky
Hi. I just wrote an article about Building CLI Apps With Symfony Console Component. Since there is no official documentation for this compoent yet, maybe someone will find it useful http://dev.umpirsky.com/building-cli-apps-with-symfony-console-component/. Regards, Saša Stamenković. -- If you

[symfony-users] Symfony2: How to access view / router in Twig

2011-01-02 Thread Julian
Hi, I recently started learning Symfony2 and with all the facile documentation it is pretty hard to read the essentials for beginners out. So I will probably write a guided introduction as soon as I understand most aspects of SF2. But until then I have to read through a lot of vague descriptions

[symfony-users] doctrine natural join

2011-01-02 Thread jack
hi everybody, I 'm trying to run the following query with doctrine SELECT o.record_id AS record_id, MAX( o.raw_field_id ) AS raw_field_id, COUNT( * ) AS count FROM records r LEFT JOIN archives a ON ( r.archive_id = a.archive_id ) , search_objects o NATURAL JOIN search_object_keywords o0 NATURAL

Re[2]: [symfony-users] doctrine many-to-many relation

2011-01-02 Thread Ramunas
Title: Re[2]: [symfony-users] doctrine many-to-many relation In addition you can read 'practical symfony' day 3 tutorial for a real world example and a brief explanation of how to use many to many relations: http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03 And for available schema.yml

[symfony-users] Re: doctrine:generate:entities generating classes in wrong folder?

2011-01-02 Thread pzwosta
Hi jorge, I had the same problem. Two changes in line 70 and 76 of the file Symfony\Bundle\DoctrineBundle\Command \GenerateEntitiesDoctrineCommand.php did it for me. On line 76 the first str_replace doesn't work as the slashes are the other way round in the result of getPath . Add the second

Re[2]: [symfony-users] doctrine many-to-many relation

2011-01-02 Thread Ramunas
Title: Re[2]: [symfony-users] doctrine many-to-many relation Description of M:M relation you can find in this page: http://melikedev.com/2009/12/09/symfony-w-doctrine-saving-many-to-many-mm-relationships/ Full schema.yml configuration reference for doctrine you can find here:

Re: [symfony-users] Symfony Console Component

2011-01-02 Thread Gustavo Adrian
Very good article. It's nice to see articles touching topics like this that are not covered yet by the official docs. Great job! On Thu, Dec 30, 2010 at 12:23 PM, umpirsky umpir...@gmail.com wrote: Hi. I just wrote an article about Building CLI Apps With Symfony Console Component. Since

Re: [symfony-users] Two different objects on the same list

2011-01-02 Thread Alan Bem
I also thought about inheritance with doctrine, but i don't like having one table with everything inside (in the case of simple and column aggregation inheritance, the concrete inheritance doesn't seem to be helpful in that case). I would go with that, If youre worried about displaying

Re: [symfony-users] Help Optimization Loading Symfony

2011-01-02 Thread Stéphane
Hello, About loading performances: for doctrine : http://www.doctrine-project.org/documentation/manual/1_0/en/improving-performance:compile for symfony : http://www.symfony-project.org/book/1_0/18-performance search for Optimizing your code Regards, Before Printing, Think about Your

Re: [symfony-users] symfony and memcache doubt

2011-01-02 Thread Gareth McCumskey
Google is your friend. A quick search for symfony memcache and I get http://www.designdisclosure.com/2009/11/symfony-apc-cache-and-memcache-session-storage/ http://www.designdisclosure.com/2009/11/symfony-apc-cache-and-memcache-session-storage/There is really nothing different you need to do

[symfony-users] Re: Symfony2 SetCookie

2011-01-02 Thread Michael
Note: the $response object is being set when the service is loaded (as a dependency) service id=demo.user class=%demo.user.class% argument type=collection argument key=session_path%demo.user.options.session_path%/ argument argument key=remember_me_cookie_name

Re: [symfony-users] Symfony2: How to access view / router in Twig

2011-01-02 Thread Jordi Boggiano
I agree it's not in the most obvious of places, but it's indeed in the documentation at http://docs.symfony-reloaded.org/master/quick_tour/the_view.html#creating-links-between-pages Cheers On Fri, Dec 31, 2010 at 2:35 PM, Julian velmbres...@googlemail.com wrote: Hi, I recently started

Re: [symfony-users] Spreading Symfony2 application (services) across cloud with Gearman

2011-01-02 Thread Jordi Boggiano
On Sat, Jan 1, 2011 at 3:38 PM, Ville Mattila ville.j.matt...@gmail.com wrote: 1) Build a symfony2 console command that does all tasks and tie the command with a gearman worker process. In this way, whenever gearmand receives a task finalize_registration, it feeds it to the Symfony2 console

Re: [symfony-users] [Symfony2] Many questions (cache, Doctrine)

2011-01-02 Thread Jordi Boggiano
On Wed, Dec 29, 2010 at 9:34 PM, elNiño pawel.gniadkow...@elnino.pl wrote: 1) Cache - is it working for you? How can I simply cache action for 60 seconts (I don't want to execute any PHP/SQL code - simply cache HTML output). It works, read

[symfony-users] Role Base Access Control Database

2011-01-02 Thread veral
How to create a logging system through the database? Using the user table of the database and don't use a user table of the plugin sfGuard. I need to implementate the Role Base Access Control database, in my case for the PostgreSQL database. Sorry for my English, I'm from Paraguay. -- If you

Re: [symfony-users] Best practice to allow for Action reuse?

2011-01-02 Thread Eric B
On Sun, Jan 2, 2011 at 9:08 AM, Svetoslav Shterev bgsa...@gmail.com wrote: On Sat, 2011-01-01 at 23:36 -0800, benze wrote: Hi, I'm trying to figure out the best way to reuse an action, and am having difficulty figuring that out. Specifically because my action seems to be tied to the

[symfony-users] Re: Form not rendering with correct data from Boolean field.

2011-01-02 Thread Scott O'Brien
Thanks to damon__jones from the IRC channel, it fixes the problem if I swap the order of items in the array. -- 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: Best practice to allow for Action reuse?

2011-01-02 Thread Richtermeister
You can do that. Just Pass an extra Redirect Parameter to the route and Pick it up in the Action. On Jan 3, 5:47 am, Eric B ebenza...@gmail.com wrote: On Sun, Jan 2, 2011 at 9:08 AM, Svetoslav Shterev bgsa...@gmail.com wrote: On Sat, 2011-01-01 at 23:36 -0800, benze wrote: Hi, I'm

Re: [symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Eric B
On Mon, Jan 3, 2011 at 12:45 AM, Richtermeister nex...@gmail.com wrote: You can do that. Just Pass an extra Redirect Parameter to the route and Pick it up in the Action. Sure; that's what I ended up doing. But that assumes a lot of things: 1) that the action will be a success 2) that the

Re: [symfony-users] Re: Best practice to allow for Action reuse?

2011-01-02 Thread Gareth McCumskey
There is no need to worry about every outcome. Use elseif to cover all the possibilities you care about and a final else to catch anything else or even just end your action with a default function to perform if none of the others are hit. Trying to build an action in ANY app by trying to cover

Re: [symfony-users] [Symfony2] Many questions (cache, Doctrine)

2011-01-02 Thread Tim Nagel
I'd also like to add that my impression of Doctrine 2 is that you should not be doing activities inside the entity that need the entity manager, that it is more 'appropriate' to the design patterns used that it occur elsewhere? t On Mon, Jan 3, 2011 at 04:30, Jordi Boggiano j.boggi...@seld.be