[symfony-users] Re: Choices Grouping

2010-09-18 Thread ScherlOMatic
Hello! First of all which version is your project based on? If 1.4 think about an upgrade and maybe switch to Doctrine as well. I also started with propel but no way... So you wanna have checkboxes or not? Maybe you could give me a small draft (picture) of it. BR On 17 Sep., 20:15, Gerda

[symfony-users] [Symfony2 - Sandbox PR3] Symfony2/Doctrine2 problem repository

2010-09-18 Thread spike3111
I try to set up a simple custom repository, looking at the documentation doctrine2. I first tried the command doctrine:generate:repositories, which does not make mistakes, but that does not work either. So I created a class Entity CustomCategorieRepository ?php namespace

[symfony-users] sfWidgetFormDoctrineChoice to show non-multi selectable list

2010-09-18 Thread Martin Henits
Hi, I was wondering if anyone knows how to use sfWidgetFormDoctrineChoice to display a non-multi selectable list? I don't want to see a drop-down menu. I want to see a list of options in a box. Also I don't want to set the multiple option as true. any clue? thanks a lot -- If you want to

[symfony-users] Re: sfWidgetFormDoctrineChoice to show non-multi selectable list

2010-09-18 Thread Martin Henits
well I found the answer, so I share it in case of any help for others. new sfWidgetFormDoctrineChoice(array( 'model' = $this-getRelatedModelName('myModule'), 'add_empty' = 'Please Select ...'), array('size' = '4')) On Sep 18, 4:57 pm, Martin Henits

Re: [symfony-users] sfWidgetFormDoctrineChoice to show non-multi selectable list

2010-09-18 Thread Daniel Lohse
You mean a normal list of radio buttons, right? Just set the 'expanded' option to true and the 'multiple' option to false and you should be golden. Cheers, Daniel Sent from my iPhone4 On Sep 18, 2010, at 5:57 PM, Martin Henits martin.hen...@gmail.com wrote: Hi, I was wondering if anyone

Re: [symfony-users] [Symfony2 - Sandbox PR3] Symfony2/Doctrine2 problem repository

2010-09-18 Thread Richard D Shank
Try capitalizing @entity (@Entity) On 09/18/2010 08:41 AM, spike3111 wrote: I try to set up a simple custom repository, looking at the documentation doctrine2. I first tried the command doctrine:generate:repositories, which does not make mistakes, but that does not work either. So I created a

Re: [symfony-users] Symfony 2 - Pulling the pieces together

2010-09-18 Thread Richard D Shank
Right now, the best thing to do is to look at other people's work. Head over to http://symfony2bundles.org/ and look at some of the projects. On 09/17/2010 05:31 AM, Donald Tyler wrote: One thing I've noticed with the documentation (unless I'm just missing it), is that there seems to be

[symfony-users] Re: [Symfony2 - Sandbox PR3] Symfony2/Doctrine2 problem repository

2010-09-18 Thread spike3111
I did not understand the need to define the class in the mapping and not in the entity class. I am French, I am mistaken in translating the documentation (ok it is a hoax:)) So I added in my file xxx.dcm.xml this option: entity name=Application\HelloBundle\Entity\Categorie repository-

[symfony-users] Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Dennis Jacobfeuerborn
Hi, I'm playing around in the sandbox to get a feel for Symfony2 (I already have Symfony1 experience). After trying to get the Doctrine stuff going it ran into trouble. After enabling the doctrine dbal and orm in the config file I inserted the following line from the docs in my code: $conn =

[symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread spike3111
You have to look in the cache, the methods generated there. Surely this is getDoctrine_Dbal_DefaultConnectionService() you need. On 18 sep, 19:37, Dennis Jacobfeuerborn djacobfeuerb...@gmail.com wrote: Hi, I'm playing around in the sandbox to get a feel for Symfony2 (I already have Symfony1

Re: [symfony-users] Re: [Symfony2 - Sandbox PR3] Symfony2/Doctrine2 problem repository

2010-09-18 Thread Richard D Shank
You can do one or the other, but not both. If you didn't have the xml file, it would read the annotation from the class. On 09/18/2010 10:01 AM, spike3111 wrote: I did not understand the need to define the class in the mapping and not in the entity class. I am French, I am mistaken in

[symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Dennis Jacobfeuerborn
I'm not sure I understand what you are trying to say. I basically try to get this example going: http://docs.symfony-reloaded.org/guides/doctrine/dbal/overview.html That doesn't mention getDoctrine_Dbal_DefaultConnectionService() anywhere. On Sep 18, 7:57 pm, spike3111

Re: [symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Richard D Shank
The documentation is a little out of date. Its part of the fun of shooting at a moving target :) Bascially, by looking in the ~ProjectContainer.php, in the cache folder, you can find the method names of the services that are available. They can be called from any container. Since the

[symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread spike3111
I think the documentation is not updated. Look in the cache folder, the file helloDevDebugProjectContainer.php. The method is: /** * Gets the 'doctrine.dbal.default_connection' service. * * This service is shared. * This method always returns the same instance of the service.

[symfony-users] Re: A bug in the Web debug toolbar notification?

2010-09-18 Thread Jorge Luis
Thanks for the reply! On 17 sep, 02:38, Sebastien Armand [Pink] khe...@gmail.com wrote: Your crud generate module never sends a reply directly from the create and update actions. You are redirected either to the edit action or to the show action if you generated a module with the show option

[symfony-users] Re: A bug in the Web debug toolbar notification?

2010-09-18 Thread Jorge Luis
I think that this is a common need, I send a lot of emails from actions and then do some redirect to other place on the application, maybe this could be taken in account to some patch that show the email sent in the first redirection or something more elegant. What do you guys think? On 17 sep,

[symfony-users] Re: [doctrine 1.2] dropping a record from a doctrine_collection

2010-09-18 Thread Michael Hodges
SOLVED - used offsetUnset method foreach ($fees as $fee_ofs = $fee) { $drop_from_list = false; // peculiar business logic goes here . . . if ($drop_from_list) { // Drop fee from the collection.

[symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Dennis Jacobfeuerborn
I just wanted to be sure that this is really the way to do it and not some kind of workaround. Thanks for the pointer. Now I run into trouble with the ORM: http://docs.symfony-reloaded.org/guides/doctrine/orm/overview.html I saved the User class in the Entity directory but when I issue the

[symfony-users] Re: individual User layouts?

2010-09-18 Thread Dennis
Another approach is to do it via OOP design. Either use a Strategy for each user/group, or use inheritance, extending/modifying the object for each user/ group. On Sep 17, 8:34 am, Gustavo Adrian comfortablynum...@gmail.com wrote: Create a baseAction with a preExecute method where you check

Re: [symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Richard D Shank
I think you'll need to have your table name and maybe some other info, I don't remember off hand. Here is more info about doctrine2 http://www.doctrine-project.org/projects/orm/2.0/docs/reference/en Specifically read the Annotations Reference chapter. Richard On 09/18/2010 12:23 PM, Dennis

Re: [symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Tim Nagel
I wouldnt be looking into the cache classes for methods to use - they're auto generated, and the format used may change. (Unlikely but possible) The method I use to get things, based on looking at other projects at symfony2bundles is $em = $this-container-get('doctrine.orm.entity_manager'); You

[symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Dennis Jacobfeuerborn
That still leaves the question why a) doctrine:schema:create outputs the contents of Entity/User.php on the screen and b) says No Metadata Classes to process. after doing so. In Symfony1 I used yaml to define the schema but I don't know where to put the yaml file for the schema definition in

[symfony-users] Re: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-18 Thread Dennis Jacobfeuerborn
Hm, so I found that I apparently can store the yml files in Resources/ config/doctrine/metadata/orm/*.yml. However when I do so doctrine:schema:create no longer dumps the User.php file but still says No Metadata Classes to process. It doesn't even matter what the yaml file contains (e.g. some