/**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     if (!isset($this->clientOptions['donetext'])) {
         $this->clientOptions['donetext'] = 'Select';
     }
 }
 /**
  * Initialize the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, ['container' => 'switch']);
     if ($this->hasModel()) {
         if (!isset($this->inputOptions['name'])) {
             $this->inputOptions['name'] = Html::getInputName($this->model, $this->attribute);
         }
         if (!isset($this->inputOptions['id'])) {
             $this->inputOptions['id'] = Html::getInputId($this->model, $this->attribute);
         }
     } else {
         $this->inputOptions['name'] = $this->name;
     }
     $this->inputOptions['uncheck'] = isset($this->uncheck) ? $this->uncheck : is_null($this->uncheck) ? null : '0';
     $this->inputOptions['value'] = isset($this->value) ? $this->value : '1';
 }