TwbsMaxlength.php
public function registerClientScript()
	{
		$view = $this->getView();
		TwbsMaxlengthAsset::register($view);

		$options = empty($this->clientOptions) ? "{}" : Json::encode($this->clientOptions);
		if( isset($this->selector)) {
			$js = "jQuery(\"{$this->selector}\").maxlength(" . $options . ")";
		} else {
			$js = "jQuery(\"#{$this->options['id']}\").maxlength(" . $options . ")";
		}
		$view->registerJs($js);
	}
public function registerClientScript()
	{
		$view = $this->getView();
		TwbsMaxlengthAsset::register($view);

		$options = empty($this->clientOptions) ? "{}" : Json::encode($this->clientOptions);
		if( isset($this->selector)) {
			$js = "jQuery(\"{$this->selector}\").maxlength(" . $options . ")";
		} else {
			$js = "jQuery(\"#{$this->options['id']}\").maxlength(" . $options . ")";
		}
		$view->registerJs($js);
	}
public function registerClientScript ( ) { $ view = $ this -> getView ( ) ; TwbsMaxlengthAsset :: register ( $ view ) ; $ options = empty ( $ this -> clientOptions ) ? "{}" : Json :: encode ( $ this -> clientOptions ) ; if ( isset ( $ this -> selector ) ) { $ js = "jQuery(\"{$this->selector}\").maxlength(" . $ options . ")" ; } else { $ js = "jQuery(\"#{$this->options['id']}\").maxlength(" . $ options . ")" ; } $ view -> registerJs ( $ js ) ; }
Generates and registers javascript to start the plugin.
Generates and registers javascript to start the plugin .