public function render(Element $element)
    {
        $method = $this->getMethodNameForClass($element);

        if (!method_exists($this, $method)) {
            throw new \Exception('Error, render method "' . $method . '" was not found');
        }

        $errorHtml = $this->renderErrorMessages($element);

        $helpHtml = $this->renderHelpText($element);

        $html = $this->$method($element);

        return $html . $helpHtml . $errorHtml;
    }
public function render(Element $element)
    {
        $method = $this->getMethodNameForClass($element);

        if (!method_exists($this, $method)) {
            throw new \Exception('Error, render method "' . $method . '" was not found');
        }

        $errorHtml = $this->renderErrorMessages($element);

        $helpHtml = $this->renderHelpText($element);

        $html = $this->$method($element);

        return $html . $helpHtml . $errorHtml;
    }
public function render ( Element $ element ) { $ method = $ this -> getMethodNameForClass ( $ element ) ; if ( ! method_exists ( $ this , $ method ) ) { throw new \ Exception ( 'Error, render method "' . $ method . '" was not found' ) ; } $ errorHtml = $ this -> renderErrorMessages ( $ element ) ; $ helpHtml = $ this -> renderHelpText ( $ element ) ; $ html = $ this -> $ method ( $ element ) ; return $ html . $ helpHtml . $ errorHtml ; }
Render the given element.

@param Element $element
@return string The HTML of the element
@throws \Exception
Render the given element .