Redaxscript\Html\Form::render PHP Method

render() public method

render the form
Since: 2.6.0
public render ( ) : string
return string
    public function render()
    {
        $output = Hook::trigger('formStart');
        $formElement = new Element();
        $formElement->init('form', $this->_attributeArray['form']);
        /* collect output */
        $output .= $formElement->html($this->_html);
        $output .= Hook::trigger('formEnd');
        return $output;
    }

Usage Example

 /**
  * testCaptcha
  *
  * @param array $expect
  *
  * @dataProvider providerCaptcha
  *
  * @since 2.6.0
  */
 public function testCaptcha($expect = array())
 {
     /* setup */
     $form = new Html\Form($this->_registry, $this->_language);
     $form->init();
     $form->captcha($expect['type']);
     /* actual */
     $actual = $form->render();
     /* compare */
     $this->assertStringStartsWith($expect['prefix'], $actual);
     $this->assertStringEndsWith($expect['suffix'], $actual);
 }
All Usage Examples Of Redaxscript\Html\Form::render