Re: [symfony-users] Addinf global configuration variables

2010-08-23 Thread Alexandre Salomé
(put code in your model) 2010/8/23 Alexandre Salomé > Hello, > > You should put labels in class code : > > class MyClass > { > const STATUS_OPENED = 0; > const STATUS_CLOSED = 1; > > protected $labels = array( > self::STATUS_OPENED => "Opened", > self::STATUS_CLOSED => "Closed" >

Re: [symfony-users] Addinf global configuration variables

2010-08-23 Thread Alexandre Salomé
Hello, You should put labels in class code : class MyClass { const STATUS_OPENED = 0; const STATUS_CLOSED = 1; protected $labels = array( self::STATUS_OPENED => "Opened", self::STATUS_CLOSED => "Closed" ); public function getLabel() { // ... } } 2010/8/23 torok84 >

[symfony-users] Addinf global configuration variables

2010-08-23 Thread torok84
Hi, I have a model that has a numeric field that indicates a status it can be 1 Opened 2 Closed (It might change in the future). I want to output the status on the view, transalting numbers to strings. I will create an array a[1] = "Open"; a[2] = "Closed"; I will access the array a in the view to