public function delete($location = '')
 {
     if ($this->active == true) {
         $this->pushValidateError('active', 'Không thể xóa khi Active = true', 'error');
         return false;
     }
     return parent::delete($location);
     // TODO: Change the autogenerated stub
 }
Esempio n. 2
0
 protected function CALCFIELDS($flowfield_name)
 {
     if ($flowfield_name == '_permalink') {
         $this->qd_cached_attr[$flowfield_name] = $this->getPermalink();
         //return
         return $this->qd_cached_attr[$flowfield_name];
     }
     return parent::CALCFIELDS($flowfield_name);
 }
Esempio n. 3
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('description' => array(), 'active' => array('DataType' => 'Boolean'), 'parent_id' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdUserGroup', 'Field' => 'id', 'TableFilter' => array()))));
     $obj['id']['ReadOnly'] = false;
     return $obj;
 }
Esempio n. 4
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('content' => array(), 'model' => array('ReadOnly' => true), 'model_id' => array('ReadOnly' => true)));
 }
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('description' => array('DataType' => 'WYSIWYG'), 'compatible' => array('DataType' => 'Boolean'), 'object_type' => array('Caption' => array('en-US' => 'Object Type', 'vi-VN' => 'Object Type'), 'DataType' => 'Option', 'Options' => array(static::$OBJECT_TYPE_MODEL => array('Caption' => array('en-US' => 'Model', 'vi-VN' => 'Model')), static::$OBJECT_TYPE_PAGE => array('Caption' => array('en-US' => 'Page', 'vi-VN' => 'Page')), static::$OBJECT_TYPE_DATAPORT => array('Caption' => array('en-US' => 'Dataport', 'vi-VN' => 'Dataport')), static::$OBJECT_TYPE_LAYOUT => array('Caption' => array('en-US' => 'Layout', 'vi-VN' => 'Layout')), static::$OBJECT_TYPE_MENU => array('Caption' => array('en-US' => 'menu', 'vi-VN' => 'Menu')), static::$OBJECT_TYPE_TABLE => array('Caption' => array('en-US' => 'Table', 'vi-VN' => 'Table')), static::$OBJECT_TYPE_COLUMN => array('Caption' => array('en-US' => 'Column', 'vi-VN' => 'Column')), static::$OBJECT_TYPE_OTHER => array('Caption' => array('en-US' => 'Other', 'vi-VN' => 'Other')))), 'object_name' => array(), 'version' => array(), 'layer' => array('Caption' => array('en-US' => 'Layer', 'vi-VN' => 'Layer'), 'DataType' => 'Option', 'Options' => array(static::$LAYER_FW => array('Caption' => array('en-US' => 'Framework', 'vi-VN' => 'Framework')), static::$LAYER_APP => array('Caption' => array('en-US' => 'App', 'vi-VN' => 'App')), static::$LAYER_THEME => array('Caption' => array('en-US' => 'Theme', 'vi-VN' => 'Theme')), static::$LAYER_DB => array('Caption' => array('en-US' => 'Database', 'vi-VN' => 'Database')), static::$LAYER_OTHER => array('Caption' => array('en-US' => 'Other', 'vi-VN' => 'Other')))), 'action' => array('Caption' => array('en-US' => 'Action', 'vi-VN' => 'Action'), 'DataType' => 'Option', 'Options' => array(static::$ACTION_CREATE => array('Caption' => array('en-US' => 'Create', 'vi-VN' => 'Create')), static::$ACTION_MODIFY => array('Caption' => array('en-US' => 'Modify', 'vi-VN' => 'Modify')), static::$ACTION_REMOVE => array('Caption' => array('en-US' => 'Remove', 'vi-VN' => 'Remove')), static::$ACTION_OTHER => array('Caption' => array('en-US' => 'Other', 'vi-VN' => 'Other'))))));
 }
Esempio n. 6
0
 public function getSEOMeta()
 {
     $obj = parent::getSEOMeta();
     // TODO: Change the autogenerated stub
     $title_found = false;
     $desc_found = false;
     foreach ($obj as $item) {
         if ($item->meta_name == QdSEOMeta::$META_NAME_TITLE) {
             $title_found = true;
         } else {
             if ($item->meta_name == QdSEOMeta::$META_NAME_DESCRIPTION) {
                 $desc_found = true;
             }
         }
     }
     if (!$title_found) {
         $tmp = new QdSEOMeta();
         $tmp->active = true;
         $tmp->overwrite = false;
         $tmp->seo_tpl = 1;
         $tmp->meta_name = QdSEOMeta::$META_NAME_TITLE;
         $tmp->meta_value = $this->name;
         array_push($obj, $tmp);
     }
     if (!$desc_found) {
         $tmp = new QdSEOMeta();
         $tmp->active = true;
         $tmp->overwrite = true;
         $tmp->seo_tpl = 1;
         $tmp->meta_name = QdSEOMeta::$META_NAME_DESCRIPTION;
         $price = number_format($this->_price_discount, 0, '.', ',') . ' VND';
         if ($this->discount_percent > 0) {
             $price .= ' (' . $this->discount_percent * 100 . '% OFF)';
         }
         $tmp->meta_value = substr(strip_tags($this->description), 0, 80) . '...' . $price;
         array_push($obj, $tmp);
     }
     return $obj;
 }
Esempio n. 7
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('_product_name' => array('Name' => '_product_name', 'Caption' => array('en-US' => 'Product Name', 'vi-VN' => 'Tên SP'), 'DataType' => 'Text', 'FieldClass' => 'FlowField', 'FieldClass_FlowField' => array('Method' => 'Lookup', 'Table' => 'QdProduct', 'Field' => 'name', 'TableFilter' => array(0 => array('Field' => 'id', 'Type' => 'FIELD', 'Value' => 'product_id')))), 'product_id' => array('Name' => 'product_id', 'Caption' => array('en-US' => 'Product ID', 'vi-VN' => 'Mã SP'), 'DataType' => 'Code', 'Numeric' => true, 'Description' => '', 'Editable' => true, 'InitValue' => '0', 'FieldClass' => 'Normal', 'ReadOnly' => true), 'order' => array(), '_r_product_name' => array('Name' => '_r_product_name', 'Caption' => array('en-US' => 'Child Product Name', 'vi-VN' => 'Tên SP liên kết'), 'DataType' => 'Text', 'FieldClass' => 'FlowField', 'FieldClass_FlowField' => array('Method' => 'Lookup', 'Table' => 'QdProduct', 'Field' => 'name', 'TableFilter' => array(array('Field' => 'id', 'Type' => 'FIELD', 'Value' => 'r_product_id')))), 'r_product_type' => array(), 'r_product_id' => array('Name' => 'r_product_id', 'Caption' => array('en-US' => 'Child Product', 'vi-VN' => 'Mã SP liên kết'), 'DataType' => 'Code', 'Numeric' => true, 'Description' => '', 'Editable' => true, 'InitValue' => '0', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdProduct', 'Field' => 'id', 'TableFilter' => array()), 'DataPort' => 'product_port')));
 }
Esempio n. 8
0
 public function on_before_create()
 {
     $this->id = 1;
     parent::on_before_create();
 }
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('noseries' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdNoSeries', 'Field' => 'id', 'TableFilter' => array()), 'DataPort' => 'noseries_port'), 'model' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdQdmvcModel', 'Field' => 'id', 'TableFilter' => array()), 'DataPort' => 'qdmvcmodel_port'), 'active' => array('DataType' => 'Boolean')));
 }
Esempio n. 10
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('name' => array(), 'type' => array('Caption' => array('en-US' => 'Type', 'vi-VN' => 'Phân loại'), 'DataType' => 'Option', 'Options' => array(QdVnProvince::$TYPE_PHUONG => array('Caption' => array('en-US' => QdVnProvince::$TYPE_PHUONG, 'vi-VN' => QdVnProvince::$TYPE_PHUONG)), QdVnProvince::$TYPE_THITRAN => array('Caption' => array('en-US' => QdVnProvince::$TYPE_THITRAN, 'vi-VN' => QdVnProvince::$TYPE_THITRAN)), QdVnProvince::$TYPE_XA => array('Caption' => array('en-US' => QdVnProvince::$TYPE_XA, 'vi-VN' => QdVnProvince::$TYPE_XA)))), 'location' => array(), 'districtid' => array(), '_districtname' => array('Name' => '_districtname', 'Caption' => array('en-US' => 'District Name', 'vi-VN' => 'Tên Quận/Huyện'), 'DataType' => 'Text', 'FieldClass' => 'FlowField', 'FieldClass_FlowField' => array('Method' => 'Lookup', 'Table' => 'QdVnDistrict', 'Field' => 'name', 'TableFilter' => array(0 => array('Field' => 'id', 'Type' => 'FIELD', 'Value' => 'districtid')))), '_provinceid' => array('Name' => '_provinceid', 'Caption' => array('en-US' => 'Mã Tỉnh', 'vi-VN' => 'Mã Tỉnh/Thành phố'), 'DataType' => 'Text', 'FieldClass' => 'FlowField', 'FieldClass_FlowField' => array('Method' => 'Lookup', 'Table' => 'QdVnDistrict', 'Field' => 'provinceid', 'TableFilter' => array(0 => array('Field' => 'id', 'Type' => 'FIELD', 'Value' => 'districtid')))), '_provincename' => array('Name' => '_provincename', 'Caption' => array('en-US' => 'Tên Tỉnh', 'vi-VN' => 'Tên Tỉnh/Thành phố'), 'DataType' => 'Text', 'FieldClass' => 'FlowField', 'FieldClass_FlowField' => array('Method' => 'Lookup', 'Table' => 'QdVnProvince', 'Field' => 'name', 'TableFilter' => array(0 => array('Field' => 'id', 'Type' => 'FIELD', 'Value' => '_provinceid'))))));
 }
Esempio n. 11
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('name' => array(), 'type' => array('Caption' => array('en-US' => 'Type', 'vi-VN' => 'Phân loại'), 'DataType' => 'Option', 'Options' => array(QdVnProvince::$TYPE_THANHPHO => array('Caption' => array('en-US' => 'Thành Phố', 'vi-VN' => 'Thành Phố')), QdVnProvince::$TYPE_QUAN => array('Caption' => array('en-US' => 'Quận', 'vi-VN' => 'Quận')), QdVnProvince::$TYPE_HUYEN => array('Caption' => array('en-US' => 'Huyện', 'vi-VN' => 'Huyện')), QdVnProvince::$TYPE_THIXA => array('Caption' => array('en-US' => 'Thị Xã', 'vi-VN' => 'Thị Xã')))), 'location' => array(), 'provinceid' => array(), '_provincename' => array('Name' => '_provincename', 'Caption' => array('en-US' => 'Province Name', 'vi-VN' => 'Tên Tỉnh/TP'), 'DataType' => 'Text', 'FieldClass' => 'FlowField', 'FieldClass_FlowField' => array('Method' => 'Lookup', 'Table' => 'QdVnProvince', 'Field' => 'name', 'TableFilter' => array(0 => array('Field' => 'id', 'Type' => 'FIELD', 'Value' => 'provinceid'))))));
 }
Esempio n. 12
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('title' => array('Caption' => array('en-US' => 'Title', 'vi-VN' => 'Tiêu đề')), 'description' => array('Caption' => array('en-US' => 'Description', 'vi-VN' => 'Mô tả')), 'avatar' => array('Caption' => array('en-US' => 'Avatar', 'vi-VN' => 'Hình đại diện'), 'DataType' => 'Image', 'Description' => 'Hình đại diện'), 'order' => array('Caption' => array('vi-VN' => 'Thứ tự')), 'active' => array('DataType' => 'Boolean'), 'parent_id' => array('Name' => 'parent_id', 'Caption' => array('en-US' => 'Parent ID', 'vi-VN' => 'Mã loại cha'), 'DataType' => 'Code', 'Numeric' => true, 'Description' => '', 'Editable' => true, 'InitValue' => '0', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdPostCat', 'Field' => 'id', 'TableFilter' => array(array('Condition' => array('Field' => '', 'Type' => 'CONST', 'Value' => ''), 'Field' => 'type', 'Type' => 'FIELD', 'Value' => static::$TYPE_POSTCAT)))), 'type' => array('Caption' => array('en-US' => 'Type', 'vi-VN' => 'Phân loại'), 'DataType' => 'Option', 'Options' => array(static::$TYPE_POSTCAT => array('Caption' => array('en-US' => 'Post Cat', 'vi-VN' => 'Post Cat'))))));
     $obj['__sys_lines_url']['TableRelation'] = array('Table' => 'QdPost', 'Field' => 'id', 'TableFilter' => array(array('Condition' => array('Field' => '', 'Type' => 'CONST', 'Value' => ''), 'Field' => 'post_cat_id', 'Type' => 'FIELD', 'Value' => 'id')));
     return $obj;
 }
Esempio n. 13
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('usergroupid' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdUserGroup', 'Field' => 'id', 'TableFilter' => array())), 'userid' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdUser', 'Field' => 'id', 'TableFilter' => array()))));
     return $obj;
 }
Esempio n. 14
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('content' => array('DataType' => 'WYSIWYG'), 'type' => array('Caption' => array('en-US' => 'Type', 'vi-VN' => 'Type'), 'DataType' => 'Option', 'Options' => array(static::$TYPE_ => array('Caption' => array('en-US' => 'Default', 'vi-VN' => 'Mặc định')), static::$TYPE_BDS => array('Caption' => array('en-US' => 'Real Estate', 'vi-VN' => 'Bất động sản')))), 'description' => array('DataType' => 'Text')));
     $obj['id']['ReadOnly'] = false;
     return $obj;
 }
Esempio n. 15
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('from_no' => array('DataType' => 'Integer'), 'to_no' => array('DataType' => 'Integer'), 'last_no' => array('DataType' => 'Integer'), 'prefix' => array('DataType' => 'Integer'), 'active' => array('Caption' => array('en-US' => 'Active', 'vi-VN' => 'Kích hoạt'), 'DataType' => 'Boolean', 'InitValue' => true), 'manual_allowed' => array('DataType' => 'Boolean'), 'fixed_length' => array('DataType' => 'Boolean')));
     $obj['id']['ReadOnly'] = false;
     return $obj;
 }
Esempio n. 16
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('name' => array(), 'type' => array('Caption' => array('en-US' => 'Type', 'vi-VN' => 'Phân loại'), 'DataType' => 'Option', 'Options' => array(static::$TYPE_THANHPHO => array('Caption' => array('en-US' => static::$TYPE_THANHPHO, 'vi-VN' => static::$TYPE_THANHPHO)), static::$TYPE_TINH => array('Caption' => array('en-US' => static::$TYPE_TINH, 'vi-VN' => static::$TYPE_TINH))))));
 }
Esempio n. 17
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array());
 }
Esempio n. 18
0
 public static function getFieldsConfig()
 {
     return array_merge(parent::getFieldsConfig(), array('count' => array('DataType' => 'Integer'), 'wpid' => array()));
 }
Esempio n. 19
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('username' => array('ReadOnly' => true), 'displayname' => array('ReadOnly' => true), 'status' => array('DataType' => 'Boolean', 'ReadOnly' => true)));
     $obj['id']['ReadOnly'] = true;
     return $obj;
 }
Esempio n. 20
0
 public static function getFieldsConfig()
 {
     $obj = array_merge(parent::getFieldsConfig(), array('usergroupid' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdUserGroup', 'Field' => 'id', 'TableFilter' => array())), 'classname' => array(), 'methodname' => array(), 'pagename' => array('DataType' => 'Code', 'FieldClass' => 'Normal', 'TableRelation' => array('Table' => 'QdQdmvcPage', 'Field' => 'id', 'TableFilter' => array()), 'DataPort' => 'qdmvcpage_port'), 'active' => array('DataType' => 'Boolean')));
     return $obj;
 }