/**
  * Creates column objects and initializes them.
  */
 protected function initColumns()
 {
     if (empty($this->columns)) {
         $this->guessColumns();
     }
     foreach ($this->columns as $i => $column) {
         $column = Yii::createObject(array_merge(['class' => MultipleInputColumn::className(), 'widget' => $this], $column));
         $this->columns[$i] = $column;
     }
 }
 /**
  * @return TableRenderer
  */
 private function createRenderer()
 {
     return new TableRenderer(['id' => $this->options['id'], 'columns' => $this->columns, 'limit' => $this->limit, 'attributeOptions' => $this->attributeOptions, 'data' => $this->data, 'columnClass' => MultipleInputColumn::className(), 'context' => $this]);
 }
Example #3
0
 /**
  * @return TableRenderer
  */
 private function createRenderer()
 {
     $config = ['id' => $this->options['id'], 'columns' => $this->columns, 'limit' => $this->limit, 'attributeOptions' => $this->attributeOptions, 'data' => $this->data, 'columnClass' => MultipleInputColumn::className(), 'allowEmptyList' => $this->allowEmptyList, 'min' => $this->min, 'addButtonPosition' => $this->addButtonPosition, 'rowOptions' => $this->rowOptions, 'context' => $this];
     if (!is_null($this->removeButtonOptions)) {
         $config['removeButtonOptions'] = $this->removeButtonOptions;
     }
     if (!is_null($this->addButtonOptions)) {
         $config['addButtonOptions'] = $this->addButtonOptions;
     }
     return new TableRenderer($config);
 }