示例#1
0
文件: Plans.php 项目: ngchie/system
 public function update($params)
 {
     $source_id = $params['source_id'];
     unset($params['source_id']);
     // we don't save because admin ref issues
     $duplicate = $params['duplicate_rates'];
     unset($params['duplicate_rates']);
     $entity = parent::update($params);
     if ($duplicate) {
         $new_id = $entity['_id']->getMongoID();
         self::duplicate_rates($source_id, $new_id);
     }
     return $entity;
 }
示例#2
0
 public function getFilterFieldsOrder()
 {
     $filter_field_order = array(array('key' => array('width' => 2)), array('prefix' => array('width' => 2)));
     $post_filter_field = array(array('showprefix' => array('width' => 2)));
     return array_merge($filter_field_order, parent::getFilterFieldsOrder(), $post_filter_field);
 }
示例#3
0
 public function getSortFields()
 {
     $sort_fields = array('name' => 'Name', 'price' => 'Price');
     return array_merge($sort_fields, parent::getSortFields());
 }