original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Render the given element.
  
  @param Element $element
  @return string The HTML of the element
  @throws \Exception
docstring_tokens: Render the given element .