protected function registerClientScript()
    {
        $view = $this->getView();

        SlickAsset::register($view);

        $options = Json::encode($this->clientOptions);

        $id = $this->containerOptions['id'];

        $js[] = ";";

        $js[] = "jQuery('#$id').slick($options);";

        $view->registerJs(implode(PHP_EOL, $js), $this->jsPosition);

        foreach ($this->events as $key => $value) {
            $view->registerJs(new JsExpression("$('#".$this->id."').on('".$key."', ".$value.");"), $this->jsPosition);
        }
    }
protected function registerClientScript()
    {
        $view = $this->getView();

        SlickAsset::register($view);

        $options = Json::encode($this->clientOptions);

        $id = $this->containerOptions['id'];

        $js[] = ";";

        $js[] = "jQuery('#$id').slick($options);";

        $view->registerJs(implode(PHP_EOL, $js), $this->jsPosition);

        foreach ($this->events as $key => $value) {
            $view->registerJs(new JsExpression("$('#".$this->id."').on('".$key."', ".$value.");"), $this->jsPosition);
        }
    }
protected function registerClientScript ( ) { $ view = $ this -> getView ( ) ; SlickAsset :: register ( $ view ) ; $ options = Json :: encode ( $ this -> clientOptions ) ; $ id = $ this -> containerOptions [ 'id' ] ; $ js [ ] = ";" ; $ js [ ] = "jQuery('#$id').slick($options);" ; $ view -> registerJs ( implode ( PHP_EOL , $ js ) , $ this -> jsPosition ) ; foreach ( $ this -> events as $ key => $ value ) { $ view -> registerJs ( new JsExpression ( "$('#" . $ this -> id . "').on('" . $ key . "', " . $ value . ");" ) , $ this -> jsPosition ) ; } }
Register required scripts for the Slick plugin
Register required scripts for the Slick plugin