protected function registerClientScript()
    {

        $path      = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->clientScript;

        $cs->registerCoreScript('jquery');

        $cs->registerCssFile($assetsUrl . '/css/bootstrap-toggle-buttons.css');
        $cs->registerScriptFile($assetsUrl . '/js/jquery.toggle.buttons.js');

        /* initialize plugin */
        $selector = '#wrapper-' . TbArray::getValue('id', $this->htmlOptions, $this->getId());

        $this->getApi()->registerPlugin(
            'toggleButtons',
            $selector,
            $this->getConfiguration(),
            CClientScript::POS_READY
        );

    }
protected function registerClientScript()
    {

        $path      = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->clientScript;

        $cs->registerCoreScript('jquery');

        $cs->registerCssFile($assetsUrl . '/css/bootstrap-toggle-buttons.css');
        $cs->registerScriptFile($assetsUrl . '/js/jquery.toggle.buttons.js');

        /* initialize plugin */
        $selector = '#wrapper-' . TbArray::getValue('id', $this->htmlOptions, $this->getId());

        $this->getApi()->registerPlugin(
            'toggleButtons',
            $selector,
            $this->getConfiguration(),
            CClientScript::POS_READY
        );

    }
protected function registerClientScript ( ) { $ path = dirname ( __FILE__ ) . DIRECTORY_SEPARATOR . 'assets' ; $ assetsUrl = $ this -> getAssetsUrl ( $ path ) ; /* @var $cs CClientScript */ $ cs = Yii :: app ( ) -> clientScript ; $ cs -> registerCoreScript ( 'jquery' ) ; $ cs -> registerCssFile ( $ assetsUrl . '/css/bootstrap-toggle-buttons.css' ) ; $ cs -> registerScriptFile ( $ assetsUrl . '/js/jquery.toggle.buttons.js' ) ; /* initialize plugin */ $ selector = '#wrapper-' . TbArray :: getValue ( 'id' , $ this -> htmlOptions , $ this -> getId ( ) ) ; $ this -> getApi ( ) -> registerPlugin ( 'toggleButtons' , $ selector , $ this -> getConfiguration ( ) , CClientScript :: POS_READY ) ; }
Registers client scripts
Registers client scripts