vendor/2amigos/yii2-file-upload-widget/FileUpload.php
/**
     * Registers required script for the plugin to work as jQuery File Uploader
     */
Registers required script for the plugin to work as jQuery File Uploader
Registers required script for the plugin to work as jQuery File Uploader
public function registerClientScript()
    {
        $view = $this->getView();
        if($this->plus) {
            FileUploadPlusAsset::register($view);
        } else {
            FileUploadAsset::register($view);
        }
        $options = Json::encode($this->clientOptions);
        $id = $this->options['id'];
        $js[] = ";jQuery('#$id').fileupload($options);";
        if (!empty($this->clientEvents)) {
            foreach ($this->clientEvents as $event => $handler) {
                $js[] = "jQuery('#$id').on('$event', $handler);";
            }
        }
        $view->registerJs(implode("\n", $js));
    }
public function registerClientScript ( ) { $ view = $ this -> getView ( ) ; if ( $ this -> plus ) { FileUploadPlusAsset :: register ( $ view ) ; } else { FileUploadAsset :: register ( $ view ) ; } $ options = Json :: encode ( $ this -> clientOptions ) ; $ id = $ this -> options [ 'id' ] ; $ js [ ] = " ;jQuery('# $ id ').fileupload( $ options ); " ; if ( ! empty ( $ this -> clientEvents ) ) { foreach ( $ this -> clientEvents as $ event => $ handler ) { $ js [ ] = " jQuery('# $ id ').on(' $ event ',  $ handler ); " ; } } $ view -> registerJs ( implode ( " \n " , $ js ) ) ; }
Registers required script for the plugin to work as jQuery File Uploader
Registers required script for the plugin to work as jQuery File Uploader