Re: FormBuilder: Misleading names for some options

From: Date: Wed, 07 Jun 2006 14:38:59 +0000
Subject: Re: FormBuilder: Misleading names for some options
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24276@lists.php.net to get a copy of this message
On 6/7/06, Michel D'HOOGE <m.dhooge@enertecgroup.com> wrote:
Hello, If I have understood well, the word 'link' in FB options is used in 2 different ways. On one hand, there are 'outgoing' links. Those links use Foreign Keys of the main DO (i.e. the one given to the FB) to link to Primary Keys of secondary DO. On the other hand, we have 'incoming' links. That is: what to do when a DO is referenced by another one. For instance, linkDisplayFields and linkOrderFields (which used to be selectDisplayFields and selectOrderFields) are in that second case. That said, it seems to me that linkDisplayFields should be renamed to something else to remove ambiguity with the first kind of links. And linkOrderFields is also used by DataGrid as the initial sorting choice. Maybe it could be renamed to sortFields.
They were renamed from "select" because that was a renderer specific use. The use of thoss is to specify the fields to display/order by when the field is linked to. I suppose removing the "link" entirely may be an option, but this would be a BC break and I'm into RCs for FormBuilder. I'd rather not change the option names at such a late stage. I did rename many of the options a long time ago to try to make things consistent. From FormBuilder's perspective these options are named correctly. They are used when that DO is linked to.
Finally, fieldsToRender and preDefOrder looks like being redundant to me. They could be easily merged together.
Yes and no. The point of the 2 different options is to allow for setting of one of the options and changing the other. You also mised a third option here which is related: userEditableFields. All 3 do similar but different things and, again, I'm not inclined to change it at such a late stage. You're of course welcome to copy one to the other in, say, preGenerateForm. You could do this in an extended DO class very easily. -- Justin Patrin

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