public function &setContent($content)
    {
        // Set element type by analyzing the element
        switch (true) {

            case ($content instanceof FormGroup):
                $this->type = 'group';
                break;

            case ($content instanceof ControlsCollectionInterface):
                $this->type = 'collection';
                break;

            case ($content instanceof AbstractForm):
                $this->type = 'control';
                break;

            case ($content instanceof AbstractHtml):
                $this->type = 'factory';
                break;

            default:
                $this->type = 'html';
        }

        $this->content = $content;

        return $content;
    }
public function &setContent($content)
    {
        // Set element type by analyzing the element
        switch (true) {

            case ($content instanceof FormGroup):
                $this->type = 'group';
                break;

            case ($content instanceof ControlsCollectionInterface):
                $this->type = 'collection';
                break;

            case ($content instanceof AbstractForm):
                $this->type = 'control';
                break;

            case ($content instanceof AbstractHtml):
                $this->type = 'factory';
                break;

            default:
                $this->type = 'html';
        }

        $this->content = $content;

        return $content;
    }
public function & setContent ( $ content ) { // Set element type by analyzing the element switch ( true ) { case ( $ content instanceof FormGroup ) : $ this -> type = 'group' ; break ; case ( $ content instanceof ControlsCollectionInterface ) : $ this -> type = 'collection' ; break ; case ( $ content instanceof AbstractForm ) : $ this -> type = 'control' ; break ; case ( $ content instanceof AbstractHtml ) : $ this -> type = 'factory' ; break ; default : $ this -> type = 'html' ; } $ this -> content = $ content ; return $ content ; }
Sets the element.

@param sting|AbstractForm|AbstractHtml $element

@return Ambigous <\Core\Html\AbstractForm, \Core\Html\AbstractHtml, \Core\Html\FormDesigner\FormGroup>
Sets the element .