Re: DB_DataObject_FormBuilder : $fb_linkDisplayFields in inherited classes

From: Date: Thu, 21 Apr 2005 04:39:09 +0000
Subject: Re: DB_DataObject_FormBuilder : $fb_linkDisplayFields in inherited classes
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18856@lists.php.net to get a copy of this message
On 4/19/05, Thomas Balthazar <tba@voxteneo.com> wrote: > Hello, > > The situation : > - the main table DOCUMENTS > - the secondary tables : LANGUAGES and CATEGORY > > There is a m:n relation between : > - DOCUMENTS and LANGUAGES > and between > - DOCUMENTS and CATEGORY > > In the DOCUMENTS form, I can easily display checkboxes for the > LANGUAGES and CATEGORY values (with "$fb_crossLinks"). > The values displayed for the checkboxes are LANGUAGES and CATEGORY IDs. > I would like to display the associated values. > I know that I can do that by setting the "var $fb_linkDisplayFields = > array('name');" in the auto-generated LANGUAGES and CATEGORY DataObject > classes. > > My problem is that I don't want to modify those classes because they > are auto-generated. > If I alter the DB, then regenerate the DO, my modifications will be > lost... This is not true. You can alter the DO classes and if you regenerate your changes will stay provided that you didn't put them between the auto generated placeholders. The DO-based customization is what FB is built on...it wouldn't be very useful of you couldn't customize your DOs. > > So, I always work in classes that inherit from those auto-generated > classes. > But how can I do to specify "var $fb_linkDisplayFields = > array('name');" in those inherited classes in place of the > auto-generated ones. > > Thanks in advance for your help. > -- Justin Patrin

« previous php.pear.general (#18856) next »