src/Forms/CompositeField.php
public function collateDataFields(&$list, $saveableOnly = false)
    {
        foreach ($this->children as $field) {
            if (! $field instanceof FormField) {
                continue;
            }
            if ($field instanceof CompositeField) {
                $field->collateDataFields($list, $saveableOnly);
            }
            if ($saveableOnly) {
                $isIncluded =  ($field->hasData() && !$field->isReadonly() && !$field->isDisabled());
            } else {
                $isIncluded =  ($field->hasData());
            }
            if ($isIncluded) {
                $name = $field->getName();
                if ($name) {
                    $formName = (isset($this->form)) ? $this->form->FormName() : '(unknown form)';
                    if (isset($list[$name])) {
                        $fieldClass = get_class($field);
                        $otherFieldClass = get_class($list[$name]);
                        user_error(
                            "collateDataFields() I noticed that a field called '$name' appears twice in"
                             . " your form: '{$formName}'.  One is a '{$fieldClass}' and the other is a"
                             . " '{$otherFieldClass}'",
                            E_USER_ERROR
                        );
                    }
                    $list[$name] = $field;
                }
            }
        }
    }
public function collateDataFields(&$list, $saveableOnly = false)
    {
        foreach ($this->children as $field) {
            if (! $field instanceof FormField) {
                continue;
            }
            if ($field instanceof CompositeField) {
                $field->collateDataFields($list, $saveableOnly);
            }
            if ($saveableOnly) {
                $isIncluded =  ($field->hasData() && !$field->isReadonly() && !$field->isDisabled());
            } else {
                $isIncluded =  ($field->hasData());
            }
            if ($isIncluded) {
                $name = $field->getName();
                if ($name) {
                    $formName = (isset($this->form)) ? $this->form->FormName() : '(unknown form)';
                    if (isset($list[$name])) {
                        $fieldClass = get_class($field);
                        $otherFieldClass = get_class($list[$name]);
                        user_error(
                            "collateDataFields() I noticed that a field called '$name' appears twice in"
                             . " your form: '{$formName}'.  One is a '{$fieldClass}' and the other is a"
                             . " '{$otherFieldClass}'",
                            E_USER_ERROR
                        );
                    }
                    $list[$name] = $field;
                }
            }
        }
    }
public function collateDataFields ( & $ list , $ saveableOnly = false ) { foreach ( $ this -> children as $ field ) { if ( ! $ field instanceof FormField ) { continue ; } if ( $ field instanceof CompositeField ) { $ field -> collateDataFields ( $ list , $ saveableOnly ) ; } if ( $ saveableOnly ) { $ isIncluded = ( $ field -> hasData ( ) && ! $ field -> isReadonly ( ) && ! $ field -> isDisabled ( ) ) ; } else { $ isIncluded = ( $ field -> hasData ( ) ) ; } if ( $ isIncluded ) { $ name = $ field -> getName ( ) ; if ( $ name ) { $ formName = ( isset ( $ this -> form ) ) ? $ this -> form -> FormName ( ) : '(unknown form)' ; if ( isset ( $ list [ $ name ] ) ) { $ fieldClass = get_class ( $ field ) ; $ otherFieldClass = get_class ( $ list [ $ name ] ) ; user_error ( "collateDataFields() I noticed that a field called '$name' appears twice in" . " your form: '{$formName}'.  One is a '{$fieldClass}' and the other is a" . " '{$otherFieldClass}'" , E_USER_ERROR ) ; } $ list [ $ name ] = $ field ; } } } }
Add all of the non-composite fields contained within this field to the
list.

Sequentialisation is used when connecting the form to its data source

@param array $list
@param bool $saveableOnly
Add all of the non - composite fields contained within this field to the list .