public function run() {

		list($name, $id) = $this->resolveNameID();

		if ($this->hasModel()) {
			if ($this->form) {
				echo $this->form->checkBox($this->model, $this->attribute, $this->htmlOptions);
			} else {
				echo CHtml::activeCheckBox($this->model, $this->attribute, $this->htmlOptions);
			}
		} else {
			echo CHtml::checkBox($name, $this->value, $this->htmlOptions);
		}

		$this->registerClientScript($id);
	}
public function run() {

		list($name, $id) = $this->resolveNameID();

		if ($this->hasModel()) {
			if ($this->form) {
				echo $this->form->checkBox($this->model, $this->attribute, $this->htmlOptions);
			} else {
				echo CHtml::activeCheckBox($this->model, $this->attribute, $this->htmlOptions);
			}
		} else {
			echo CHtml::checkBox($name, $this->value, $this->htmlOptions);
		}

		$this->registerClientScript($id);
	}
public function run ( ) { list ( $ name , $ id ) = $ this -> resolveNameID ( ) ; if ( $ this -> hasModel ( ) ) { if ( $ this -> form ) { echo $ this -> form -> checkBox ( $ this -> model , $ this -> attribute , $ this -> htmlOptions ) ; } else { echo CHtml :: activeCheckBox ( $ this -> model , $ this -> attribute , $ this -> htmlOptions ) ; } } else { echo CHtml :: checkBox ( $ name , $ this -> value , $ this -> htmlOptions ) ; } $ this -> registerClientScript ( $ id ) ; }
Widget's run function
Widget s run function