Core/Html/FormDesigner/FormGroup.php
private function elementFactory($type, $content, $unshift = false)
    {
        $element = $this->factory->create('FormDesigner\FormElement');
        $element->setContent($content);

        if ($unshift == true) {
            array_unshift($this->elements, $element);
        }
        else {
            $this->elements[] = $element;
        }

        return $element;
    }
private function elementFactory($type, $content, $unshift = false)
    {
        $element = $this->factory->create('FormDesigner\FormElement');
        $element->setContent($content);

        if ($unshift == true) {
            array_unshift($this->elements, $element);
        }
        else {
            $this->elements[] = $element;
        }

        return $element;
    }
private function elementFactory ( $ type , $ content , $ unshift = false ) { $ element = $ this -> factory -> create ( 'FormDesigner\FormElement' ) ; $ element -> setContent ( $ content ) ; if ( $ unshift == true ) { array_unshift ( $ this -> elements , $ element ) ; } else { $ this -> elements [ ] = $ element ; } return $ element ; }
Factory mehtod to create new FormElement object within this group object.

@param string $type
Elementtype to create
@param string|AbstractForm|AbstractHtml|FormGroup $content
Content of the element to create
@param bool $unshift
Optional boolean flag to add element on top of elements stack of this group

@return \Core\Html\FormDesigner\FormElement
Factory mehtod to create new FormElement object within this group object .