Example #1
0
 public function renderFilterContent()
 {
     if ($this->filter && $this->values) {
         $data = [];
         foreach ($this->values as $key => $value) {
             $data[$key] = $value['title'];
         }
         $this->filter = array('type' => $this->filter, 'data' => $data);
     }
     return parent::renderFilterContent();
 }
Example #2
0
 protected function createObject($params)
 {
     if (empty($params['name']) || is_int($params['name'])) {
         throw new \Exception('Please get the name for control');
     }
     if (empty($params['type']) && empty($params['class'])) {
         $params['class'] = Column::className();
     }
     if (isset($params['type'])) {
         $type = $params['type'];
         if (isset(static::$builtInColumns[$type])) {
             $type = static::$builtInColumns[$type];
         }
         if (is_array($type)) {
             $params = array_merge($type, $params);
         } else {
             $params['class'] = $type;
         }
     }
     return Yii::createObject($params, [$this->owner]);
 }
Example #3
0
 public function renderFilterContent()
 {
     $this->filter = ['name' => $this->name, 'type' => 'daterangepicker', 'container' => '.action-bar', 'live' => true, 'data' => ['opens' => 'left', 'startDate' => date($this->dateFormat, $this->filterValue['start']), 'endDate' => date($this->dateFormat, $this->filterValue['end']), 'locale' => ['filter' => 'DD.MM.YYYY h:mm'], 'ranges' => SyDatePicker::dateRanges($this->dateFormat)]];
     return parent::renderFilterContent();
 }