public function registerScript($id, $name)
    {
        $view = $this->getView();
        AjaxDropdownAsset::register($view);
        $options = Json::encode($this->prepareOptions($name));
        $view->registerJs("jQuery('#$id').ajaxDropDown($options);");
    }
public function registerScript($id, $name)
    {
        $view = $this->getView();
        AjaxDropdownAsset::register($view);
        $options = Json::encode($this->prepareOptions($name));
        $view->registerJs("jQuery('#$id').ajaxDropDown($options);");
    }
public function registerScript ( $ id , $ name ) { $ view = $ this -> getView ( ) ; AjaxDropdownAsset :: register ( $ view ) ; $ options = Json :: encode ( $ this -> prepareOptions ( $ name ) ) ; $ view -> registerJs ( "jQuery('#$id').ajaxDropDown($options);" ) ; }
Registers assets and calls JS plugin.
@param string $id ID of the widget
@param string $name Name of the widget
Registers assets and calls JS plugin .