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;
    }