widgets/GridView.php
protected function registerWidget($name = null, $id = null)
    {
        if ($name === null) {
            $name = $this->getDefaultJsWidgetName();
        }

        $this->_registerBundle();

        if (!$this->isAjaxCrud && $this->getUpdateUrl()) {
            if ($id === null) {
                $id = $this->options['id'];
            }

            $options = empty($this->clientOptions) ? '' : Json::htmlEncode([
                'updateUrl' => Url::to($this->getUpdateUrl())
            ]);
            $js = "jQuery('#$id').$name($options);";
            $this->getView()->registerJs($js);
        }
    }
protected function registerWidget($name = null, $id = null)
    {
        if ($name === null) {
            $name = $this->getDefaultJsWidgetName();
        }

        $this->_registerBundle();

        if (!$this->isAjaxCrud && $this->getUpdateUrl()) {
            if ($id === null) {
                $id = $this->options['id'];
            }

            $options = empty($this->clientOptions) ? '' : Json::htmlEncode([
                'updateUrl' => Url::to($this->getUpdateUrl())
            ]);
            $js = "jQuery('#$id').$name($options);";
            $this->getView()->registerJs($js);
        }
    }
protected function registerWidget ( $ name = null , $ id = null ) { if ( $ name === null ) { $ name = $ this -> getDefaultJsWidgetName ( ) ; } $ this -> _registerBundle ( ) ; if ( ! $ this -> isAjaxCrud && $ this -> getUpdateUrl ( ) ) { if ( $ id === null ) { $ id = $ this -> options [ 'id' ] ; } $ options = empty ( $ this -> clientOptions ) ? '' : Json :: htmlEncode ( [ 'updateUrl' => Url :: to ( $ this -> getUpdateUrl ( ) ) ] ) ; $ js = "jQuery('#$id').$name($options);" ; $ this -> getView ( ) -> registerJs ( $ js ) ; } }
Registers a specific jQuery UI widget options
@param string $name the name of the jQuery UI widget
@param string $id the ID of the widget
Registers a specific jQuery UI widget options