original_string: protected function registerClientEvents($sliderVarName = null)
      {
          if (!empty($this->clientEvents)) {
              $js = [];
              foreach ($this->clientEvents as $event => $handler) {
                  $js[] = "$sliderVarName.noUiSlider.on('$event', $handler);";
              }
              $this->getView()->registerJs(implode("\n", $js));
          }
      }
code: protected function registerClientEvents($sliderVarName = null)
      {
          if (!empty($this->clientEvents)) {
              $js = [];
              foreach ($this->clientEvents as $event => $handler) {
                  $js[] = "$sliderVarName.noUiSlider.on('$event', $handler);";
              }
              $this->getView()->registerJs(implode("\n", $js));
          }
      }
code_tokens: protected function registerClientEvents ( $ sliderVarName = null ) { if ( ! empty ( $ this -> clientEvents ) ) { $ js = [ ] ; foreach ( $ this -> clientEvents as $ event => $ handler ) { $ js [ ] = "$sliderVarName.noUiSlider.on('$event', $handler);" ; } $ this -> getView ( ) -> registerJs ( implode ( "\n" , $ js ) ) ; } }
docstring: Registers the events of the slider.
  
  @param string $sliderVarName the JS variable name of the slider element.
docstring_tokens: Registers the events of the slider .