示例#1
0
 /**
  * @copydoc DBDataSet::createDataDescription
  */
 protected function createDataDescription()
 {
     $result = parent::createDataDescription();
     $result->getFieldDescriptionByName('brand_main_img')->setType(FieldDescription::FIELD_TYPE_STRING);
     foreach ($result as $fd) {
         $fd->setMode(FieldDescription::FIELD_MODE_READ);
     }
     return $result;
 }
示例#2
0
 /**
  * @copydoc DBDataSet::createDataDescription
  */
 protected function createDataDescription()
 {
     $res = DBDataSet::createDataDescription();
     if (!$res->getFieldDescriptionByName('smap_id')) {
         $f = new FieldDescription('smap_id');
         $f->setType(FieldDescription::FIELD_TYPE_INT)->setProperty('tableName', $this->getTableName());
         $res->addFieldDescription($f);
     }
     if (!$res->getFieldDescriptionByName('category')) {
         $f = new FieldDescription('category');
         $f->setType(FieldDescription::FIELD_TYPE_STRING);
         $res->addFieldDescription($f);
     }
     return $res;
 }
示例#3
0
 protected function createDataDescription()
 {
     $result = parent::createDataDescription();
     if ($this->getState() == 'main') {
         if (!($fd = $result->getFieldDescriptionByName('smap_id'))) {
             $fd = new FieldDescription('smap_id');
             $fd->setProperty('tableName', $this->getTableName());
             $result->addFieldDescription($fd);
         }
         $fd->setType(FieldDescription::FIELD_TYPE_HIDDEN);
     }
     return $result;
 }
示例#4
0
 /**
  * @copydoc DBDataSet::createDataDescription
  */
 protected function createDataDescription()
 {
     //Если поле OrderColumn присутствует в списке, убираем его
     if (in_array($this->getState(), ['printData'])) {
         $previousAction = $this->getState();
         $this->getConfig()->setCurrentState(self::DEFAULT_STATE_NAME);
         $result = parent::createDataDescription();
         $this->getConfig()->setCurrentState($previousAction);
     } else {
         $result = parent::createDataDescription();
     }
     if (($col = $this->getOrderColumn()) && ($field = $result->getFieldDescriptionByName($col))) {
         $result->removeFieldDescription($field);
     }
     return $result;
 }