vendor/2amigos/yii2-gallery-widget/src/Gallery.php
/**
     * Registers the client script required for the plugin
     */
Registers the client script required for the plugin
Registers the client script required for the plugin
public function registerClientScript()
    {
        $view = $this->getView();
        GalleryAsset::register($view);
        DosamigosAsset::register($view);
        $id = $this->options['id'];
        $options = Json::encode($this->clientOptions);
        $js = "dosamigos.gallery.registerLightBoxHandlers('#$id a', $options);";
        $view->registerJs($js);
        if (!empty($this->clientEvents)) {
            $js = [];
            foreach ($this->clientEvents as $event => $handler) {
                $js[] = "jQuery('$id').on('$event', $handler);";
            }
            $view->registerJs(implode("\n", $js));
        }
    }
public function registerClientScript ( ) { $ view = $ this -> getView ( ) ; GalleryAsset :: register ( $ view ) ; DosamigosAsset :: register ( $ view ) ; $ id = $ this -> options [ 'id' ] ; $ options = Json :: encode ( $ this -> clientOptions ) ; $ js = " dosamigos.gallery.registerLightBoxHandlers('# $ id  a',  $ options ); " ; $ view -> registerJs ( $ js ) ; if ( ! empty ( $ this -> clientEvents ) ) { $ js = [ ] ; foreach ( $ this -> clientEvents as $ event => $ handler ) { $ js [ ] = " jQuery(' $ id ').on(' $ event ',  $ handler ); " ; } $ view -> registerJs ( implode ( " \n " , $ js ) ) ; } }
Registers the client script required for the plugin
Registers the client script required for the plugin