Create a table of attributes and create a relationship between your  
attribute table and the field that has one of the values.  Then in  
your model for attributes define the __toString() function and the  
admin genorator will automatically pull whatever __toString() returns  
so if you have a field name in your attribute table for your attribute  
then

function __toString(){
        return $this->getName();
}

Would show all the available attribute names and if one is defined in  
your other object it will be selected.

James




On Apr 3, 2008, at 4:41 PM, Ben wrote:

>
> Thanks Jill, not quite what I was after but thanks anyway.
>
> Basically, in the 'list' view I've created a new partial column
> "has_attribute_x" which (obviously) corresponds to getHasAttributeX()
> in my actions. That method does nothing more than:
>
> public function getHasAttributeX()
> {
>   return $this->getAttributeX() ? true : false;
> }
>
> ...so what I'd like to achieve on the List view is a simple indication
> of whether or not a record has attribute x, in the same way that the
> list view presents boolean fields. At the moment the list view just
> shows '1' or null for that partial column.
>
> Sorry, hopefully that's a bit more clear.
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to