Example #1
0
 /**
  * Returns shop
  *
  * @return	RM_Shop_Object
  */
 protected function object()
 {
     if (isNull($this->_shop)) {
         $this->_shop = $this->_mapper->loadShopById($this->shop_id);
     }
     return $this->_shop;
 }
Example #2
0
 /**
  *	Description...
  *
  *	@return void
  **/
 public function shop()
 {
     if (!isset($this->_shop)) {
         if (isNull($this->_shop = $this->_mapper->loadShopById($this->shop_id))) {
             $res = M('Base')->result();
             $res->error('shop_is_not_exist');
             throw new RM_Validator_Exception($res);
         }
     }
     return $this->_shop;
 }
Example #3
0
 /**
  *	Description...
  *
  *	@return void
  **/
 public function getAggregateShopTypeQuery()
 {
     return $this->_mapper->getAggregateShopTypeQuery();
 }
Example #4
0
 /** Retrievs a list of shops from given network
  *
  * @return RM_Store_iRequest<RM_Shop_Object>
  */
 public function shops()
 {
     return $this->_mapper->shopList()->filter('trade_center_id=?', $this->id());
 }
Example #5
0
 public function checkDelete()
 {
     return $this->_mapper->shopTypeDeleteCheck($this);
 }
Example #6
0
 public function checkDelete()
 {
     return $this->_mapper->networkDeleteCheck($this);
 }
Example #7
0
 /**
  *	Description...
  *
  *	@return void
  **/
 public function forbidden()
 {
     return $this->_mapper->lastPurchaseDaysAgo($this) > 60;
 }