src/widgets/ActiveForm.php
public function run()
    {
        if (!empty($this->_fields)) {
            throw new InvalidCallException('Each beginField() should have a matching endField() call.');
        }

        $content = ob_get_clean();
        $html = Html::beginForm($this->action, $this->method, $this->options);
        $html .= $content;
        $html .= Html::endForm();

        return $html;
    }
public function run()
    {
        if (!empty($this->_fields)) {
            throw new InvalidCallException('Each beginField() should have a matching endField() call.');
        }

        $content = ob_get_clean();
        $html = Html::beginForm($this->action, $this->method, $this->options);
        $html .= $content;
        $html .= Html::endForm();

        return $html;
    }
public function run ( ) { if ( ! empty ( $ this -> _fields ) ) { throw new InvalidCallException ( 'Each beginField() should have a matching endField() call.' ) ; } $ content = ob_get_clean ( ) ; $ html = Html :: beginForm ( $ this -> action , $ this -> method , $ this -> options ) ; $ html .= $ content ; $ html .= Html :: endForm ( ) ; return $ html ; }
Runs the widget.
This registers the necessary JavaScript code and renders the form open and close tags.

@throws InvalidCallException if `beginField()` and `endField()` calls are not matching.
Runs the widget . This registers the necessary JavaScript code and renders the form open and close tags .