protected function loadDataDescription()
 {
     $result = parent::loadDataDescription();
     if (in_array($this->getState(), array('add', 'edit', 'save'))) {
         unset($result['vote_id']);
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * @copydoc Grid::loadDataDescription
  */
 protected function loadDataDescription()
 {
     $result = parent::loadDataDescription();
     if ($this->getState() == 'edit') {
         unset($result['comment_parent_id']);
         unset($result['target_id']);
         $result['u_id']['key'] = false;
         $result['u_id']['type'] = QAL::COLTYPE_STRING;
     }
     return $result;
 }
Esempio n. 3
0
 /**
  * @copydoc Grid::loadDataDescription
  */
 protected function loadDataDescription()
 {
     $result = parent::loadDataDescription();
     //Якщо у конфігі вказано обмеження на кількість полів, які мають відображатися у Grid'і (states: main, getRawData), то застосувати його.
     //Інакше відобразити всі поля.
     if (in_array($this->getState(), array('main', 'getRawData'))) {
         $numFields = $this->getConfigValue('forms.result_num_fields', 6);
         if (count($result) > $numFields) {
             $result = array_splice($result, 0, $numFields);
         }
     }
     return $result;
 }
Esempio n. 4
0
 protected function loadDataDescription()
 {
     $r = parent::loadDataDescription();
     $r['upl_id']['key'] = false;
     $r[$this->getParam('pk')]['key'] = false;
     return $r;
 }
Esempio n. 5
0
 /**
  * @copydoc Grid::loadDataDescription
  */
 protected function loadDataDescription()
 {
     $result = parent::loadDataDescription();
     if ($this->getState() == 'save' && isset($result['u_password'])) {
         $result['u_password']['nullable'] = true;
     }
     return $result;
 }