[symfony-users] Re: Having a web layer for the model

2010-10-07 Thread pghoratiu
You can have another layer of business logic classes that you store in lib/ which interact with your models directly. gabriel On Oct 6, 7:24 am, Sebastien Armand [Pink] khe...@gmail.com wrote: Most of the times in symfony applications, we'll have a model let's say it's 'Product' and then

[symfony-users] Re: different form schema between applications

2010-10-07 Thread Christian
if (sfContext::getInstance()-getConfiguration()-getApplication() == 'backend) { $this-widgetSchema['payment_type_id'] = new sfWidgetFormSelect(array('choices' = $choices)); } else { $this-widgetSchema['payment_type_id'] = new

Re: [symfony-users] Re: Having a web layer for the model

2010-10-07 Thread Gareth McCumskey
class WebModelClass extends ModelClass { public function __toString() { return this-getUrl(); } public function getUrl() { return Whatever I decide to do to generate URL here!; } public function initialiseForm() { //Whatever I want to do to initialise the correct form

Re: [symfony-users] how create empty module

2010-10-07 Thread Gareth McCumskey
If you want a module not bound to a model class then you use: symfony generate:module [application] [newmodulename] which will create: application -- modules -- newmodulename -- actions actions.class.php -- templates indexSuccess.php If however you want to

Re: [symfony-users] Any smart way to operate production URL while im working in dev enviroment?

2010-10-07 Thread Gareth McCumskey
Use virtual hosts on your apache installation. You can essentially set apache up on your local machine so that if you request a certain URL it will load the local version of it instead. There is ample documentation in the symfony books about this, so I don't think I need to explain every step.

Re: [symfony-users] New line in text in propel schema, how?

2010-10-07 Thread Gareth McCumskey
What you are asking are basic skills involved in web development, and not anything related to symfony specifically. Therefore there are many ways to skin this cat: 1. How about instead of storing Foo Bar FooBar store Foobr /Barbr /FooBarbr / 2. In your template file you can use: ?php echo

Re: [symfony-users] Problems trying to go the previous element of a group of elements retrieved using a propel criteria.

2010-10-07 Thread Gareth McCumskey
I assume that $Sedi18ns is a result from a doSelect call? If so, this means that items are stored in an array. Therefore in your TEMPLATE file: ?php foreach ($Sedi18ns as $SediObj): ? ?php echo $Sedi Hang on, I have answered enough of these Every one of your questions are answered in

Re: [symfony-users] Question about I18n tables

2010-10-07 Thread Gareth McCumskey
http://www.symfony-project.org/gentle-introduction/1_4/en/ On Wed, Oct 6, 2010 at 12:35 PM, Javier Garci tirengar...@gmail.com wrote: Hi, i have this schema and fixtures: sedi: _attributes: { isI18N: true, i18nTable: sediI18n } id: ~ sediI18n: id: {

Re: [symfony-users] Problem trying to do propel:build-all-load

2010-10-07 Thread Gareth McCumskey
Your schema file is malformatted probably an extra space somewhere that shouldnt be there or some other error: http://www.symfony-project.org/gentle-introduction/1_4/en/ On Tue, Oct 5, 2010 at 10:26 PM, Javier Garcia tirengar...@gmail.comwrote: Hi, i have just installed symfony, created a

Re: [symfony-users] Call to undefined method Sedii18nPeer::doSelectWithI18n()

2010-10-07 Thread Gareth McCumskey
http://www.symfony-project.org/gentle-introduction/1_4/en/ On Wed, Oct 6, 2010 at 9:01 PM, Javier Garci tirengar...@gmail.com wrote: Hi, i have followed the steps to create a i18n table: http://www.symfony-project.org/jobeet/1_4/Propel/en/19#chapter_19_sub_propel_objects But when i try

[symfony-users] Re: Problems trying to go the previous element of a group of elements retrieved using a propel criteria.

2010-10-07 Thread Javier Garcia
Hi Gareth, Im not using foreach(), jut i'm trying to use just prev() method. Javier On Oct 7, 11:43 am, Gareth McCumskey gmccums...@gmail.com wrote: I assume that $Sedi18ns is a result from a doSelect call? If so, this means that items are stored in an array. Therefore in your TEMPLATE

Re: [symfony-users] Re: Problems trying to go the previous element of a group of elements retrieved using a propel criteria.

2010-10-07 Thread Gareth McCumskey
Thats the problem. You need to use foreach cos there IS NO prev() method. again ... http://www.symfony-project.org/gentle-introduction/1_4/en/ On Thu, Oct 7, 2010 at 1:47 PM, Javier Garcia tirengar...@gmail.com wrote: Hi Gareth, Im not using foreach(), jut i'm trying to use just prev()

Re: [symfony-users] Re: Having a web layer for the model

2010-10-07 Thread Bernhard Schussek
I rather prefer to compose than to subclass here. class ProductView { public function __construct(Product $product) { $this-product = $product; } public function setSelected($selected)... public function getUrl()... etc. } Bernhard -- If you want to report a vulnerability

[symfony-users] Clear cache in action

2010-10-07 Thread HAUSa
Is there a way to clear my cache in an action, using PHP? -- 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

Re: [symfony-users] Clear cache in action

2010-10-07 Thread Michał Piotrowski
2010/10/7 HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com: Is there a way to clear my cache in an action, using PHP? $cacheManager = sfContext::getInstance()-getViewCacheManager(); if ($cacheManager) { $cacheManager-remove('blog/index?username='.$username.'sf_format=html');

Re: [symfony-users] Clear cache in action

2010-10-07 Thread Eno
On Thu, 7 Oct 2010, [ISO-8859-2] Micha³ Piotrowski wrote: 2010/10/7 HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com: Is there a way to clear my cache in an action, using PHP? $cacheManager = sfContext::getInstance()-getViewCacheManager(); if ($cacheManager) {

[symfony-users] A simple private messaging system plugin [does it exists ?]

2010-10-07 Thread Tristan
Hello, I'm looking for a simple plugin (SF 1.4 / Doctrine) which allows to ; - send a private message to a sfDoctrineGuardUser via a send a private message link - send a mail to the user each time a private message is sent - possibility to reply / check the private mailbox I've been searching

[symfony-users] Error installing plugin

2010-10-07 Thread demispb
I receive this the error when i trying to install a plugin, i add the pear channel on my loaclhost but nothing Unable to initialize channel Unknown channel: plugins.symfony- project.org (use --force-license to force installation) -- If you want to report a vulnerability issue on symfony,

Re: [symfony-users] Re: different form schema between applications

2010-10-07 Thread Manu SW
Christian wrote, On 10/7/10 5:46 AM: if (sfContext::getInstance()-getConfiguration()-getApplication() == 'backend) { $this-widgetSchema['payment_type_id'] = new sfWidgetFormSelect(array('choices' = $choices)); } else {

Re: [symfony-users] Re: different form schema between applications

2010-10-07 Thread Andrei Dziahel
This approach makes your form untestable. I'd suggest following scenario instead: . if ($this-getOption('is_backend', false) == false) { $this-widgetSchema['payment_type_id'] = new sfWidgetFormSelect(array('choices' = $choices)); } else { $this-widgetSchema['payment_type_id'] = new

[symfony-users] sfWidgetFormInputHidden default value

2010-10-07 Thread Manu SW
Hi again, I am back with another problem in the same form : I can't get a hidden field to get initialized with a default value. This is a portion of my code : $this-setWidgets(array( 'object_id'= new sfWidgetFormPropelChoice( array('model' = 'BioObject', 'add_empty'

Re: [symfony-users] Re: Having a web layer for the model

2010-10-07 Thread Sebastien Armand [Pink]
Bunch of nice ideas here! Gotta find how to make my own sauce now! On Thu, Oct 7, 2010 at 9:40 PM, Bernhard Schussek bschus...@gmail.comwrote: I rather prefer to compose than to subclass here. class ProductView { public function __construct(Product $product) { $this-product =

[symfony-users] Organizing modules

2010-10-07 Thread Sebastien Armand [Pink]
Hi everyone, I'm faced with the current issue: the number of modules that I have is constantly growing! So is the number of model classes etc... For model classes, Doctrine provides the notion of packages that I can use to group some classes together. So this is not a problem. When it comes to