Re: DB_DataObject_FormBuilder: reorderElements, preDefOrder
| From: | Arnaud Limbourg | Date: | Fri, 07 Nov 2003 06:09:30 +0000 |
| Subject: | Re: DB_DataObject_FormBuilder: reorderElements, preDefOrder | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23317@lists.php.net to get a copy of this message | ||
Makes sense. Markus (or fabien) has to check how to implement it.
For the second mail you're right the doc should be updated.
Arnaud.
> Is there a reason to check if preDefOrder contains as many fields as the
> DataObject itself does? If this check is left out, it is possible to
> use this variable for indicating which fields to render, instead of
> implementing one more variable ("fields_to_display") in the future.
>
> function _reorderElements() {
> if(isset($this->_do->preDefOrder)
> && is_array($this->_do->preDefOrder)
> && count($this->_do->preDefOrder)== count($this->_do->table())) {
> ...
>
> In short, if I have 10 fields and I do
> $do->preDefOrder = array('firstfield', 'secondfield');
> then I'm sure I want to display only these fields and I did not write it
> wrong.