src/Framework/Form/AspiForm.php
public function prepare()
    {
        if (null === $this->getAttribute('id')) {
            $this->setAttribute('id', 'pop-form');
        }
        if (null === $this->getAttribute('class')) {
            $this->setAttribute('class', 'pop-form');
        }
        if (count($this->columns) > 0) {
            foreach ($this->columns as $class => $fieldsets) {
                $column = new Child('div');
                $column->setAttribute('class', $class);
                foreach ($fieldsets as $i) {
                    if (isset($this->fieldsets[$i])) {
                        $fieldset = $this->fieldsets[$i];
                        $fieldset->prepare();
                        $column->addChild($fieldset);
                    }
                }
                $this->addChild($column);
            }
        } else {
            foreach ($this->fieldsets as $fieldset) {
                $fieldset->prepare();
                $this->addChild($fieldset);
            }
        }
        return $this;
    }
public function prepare()
    {
        if (null === $this->getAttribute('id')) {
            $this->setAttribute('id', 'pop-form');
        }
        if (null === $this->getAttribute('class')) {
            $this->setAttribute('class', 'pop-form');
        }
        if (count($this->columns) > 0) {
            foreach ($this->columns as $class => $fieldsets) {
                $column = new Child('div');
                $column->setAttribute('class', $class);
                foreach ($fieldsets as $i) {
                    if (isset($this->fieldsets[$i])) {
                        $fieldset = $this->fieldsets[$i];
                        $fieldset->prepare();
                        $column->addChild($fieldset);
                    }
                }
                $this->addChild($column);
            }
        } else {
            foreach ($this->fieldsets as $fieldset) {
                $fieldset->prepare();
                $this->addChild($fieldset);
            }
        }
        return $this;
    }
public function prepare ( ) { if ( null === $ this -> getAttribute ( 'id' ) ) { $ this -> setAttribute ( 'id' , 'pop-form' ) ; } if ( null === $ this -> getAttribute ( 'class' ) ) { $ this -> setAttribute ( 'class' , 'pop-form' ) ; } if ( count ( $ this -> columns ) > 0 ) { foreach ( $ this -> columns as $ class => $ fieldsets ) { $ column = new Child ( 'div' ) ; $ column -> setAttribute ( 'class' , $ class ) ; foreach ( $ fieldsets as $ i ) { if ( isset ( $ this -> fieldsets [ $ i ] ) ) { $ fieldset = $ this -> fieldsets [ $ i ] ; $ fieldset -> prepare ( ) ; $ column -> addChild ( $ fieldset ) ; } } $ this -> addChild ( $ column ) ; } } else { foreach ( $ this -> fieldsets as $ fieldset ) { $ fieldset -> prepare ( ) ; $ this -> addChild ( $ fieldset ) ; } } return $ this ; }
Prepare form object for rendering

@return Form
Prepare form object for rendering