Esempio n. 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];
                 }
             }
         }
     }
 }
Esempio n. 2
0
 /**
  * Initializes the widget
  *
  * @throw InvalidConfigException
  */
 public function init()
 {
     parent::init();
 }
Esempio n. 3
0
 /**
  * Initializes the widget
  *
  * @throw InvalidConfigException
  */
 public function init()
 {
     parent::init();
     $this->options = array_merge($this->options, ['readonly' => 'true']);
 }