src/Widget.php
protected function registerClientEvents($name, $id)
    {
        if (!empty($this->clientEvents)) {
            $js = [];
            foreach ($this->clientEvents as $event => $handler) {
                if (isset($this->clientEventMap[$event])) {
                    $eventName = $this->clientEventMap[$event];
                } else {
                    $eventName = strtolower($name . $event);
                }
                $js[] = "jQuery('#$id').on('$eventName', $handler);";
            }
            $this->getView()->registerJs(implode("\n", $js));
        }
    }
protected function registerClientEvents($name, $id)
    {
        if (!empty($this->clientEvents)) {
            $js = [];
            foreach ($this->clientEvents as $event => $handler) {
                if (isset($this->clientEventMap[$event])) {
                    $eventName = $this->clientEventMap[$event];
                } else {
                    $eventName = strtolower($name . $event);
                }
                $js[] = "jQuery('#$id').on('$eventName', $handler);";
            }
            $this->getView()->registerJs(implode("\n", $js));
        }
    }
protected function registerClientEvents ( $ name , $ id ) { if ( ! empty ( $ this -> clientEvents ) ) { $ js = [ ] ; foreach ( $ this -> clientEvents as $ event => $ handler ) { if ( isset ( $ this -> clientEventMap [ $ event ] ) ) { $ eventName = $ this -> clientEventMap [ $ event ] ; } else { $ eventName = strtolower ( $ name . $ event ) ; } $ js [ ] = "jQuery('#$id').on('$eventName', $handler);" ; } $ this -> getView ( ) -> registerJs ( implode ( "\n" , $ js ) ) ; } }
Registers a specific jQuery UI widget events
@param string $name the name of the jQuery UI widget
@param string $id the ID of the widget
Registers a specific jQuery UI widget events