/** * (non-PHPdoc) * * @see \yii\base\Widget::run() */ public function run() { if (!empty($this->_fields)) { throw new InvalidCallException('Each beginField() should have a matching endField() call.'); } echo Html::endForm(); }