예제 #1
0
 /**
  * Initializes the widget
  *
  * @throw InvalidConfigException
  */
 public function init()
 {
     parent::init();
     //$this->options = array_merge($this->options,['readonly'=>'true']);
     if ($this->data) {
         $order = 0;
         if (is_array($this->model->{$this->attribute})) {
             //echo '<pre>';
             //print_r($this->model->{$this->attribute});die;
             foreach ($this->model->{$this->attribute} as $value) {
                 $order++;
                 if (is_object($value)) {
                     $this->options['options'][$value->Id] = ['data-order' => $order];
                 } else {
                     $this->options['options'][$value] = ['data-order' => $order];
                 }
             }
         }
     }
 }
예제 #2
0
 /**
  * Initializes the widget
  *
  * @throw InvalidConfigException
  */
 public function init()
 {
     parent::init();
 }
예제 #3
0
 /**
  * Initializes the widget
  *
  * @throw InvalidConfigException
  */
 public function init()
 {
     parent::init();
     $this->options = array_merge($this->options, ['readonly' => 'true']);
 }