public function action_get() { if ($this->item->id() == $this->user->id()) { return parent::action_get(); } else { throw new NotFoundException(); } }
public function action_get() { if ($this->item->customer_id == $this->user->id()) { return $this->asArrayWith(parent::action_get(), ['orderAddress']); } else { throw new NotFoundException(); } }
public function action_get() { if ($this->item->id() == $this->user->id()) { $result = parent::action_get(); $result->photoUrl = $this->item->getPhotoPath(); return $result; } else { throw new NotFoundException(); } }
public function action_get() { if ($this->item->customer_id == $this->user->id()) { $this->item->orderItems->with('product'); $data = $this->asArrayWith(parent::action_get(), ['orderAddress', 'orderItems']); $data['increment_id'] = 1000000 + $data['id']; $data['total_price'] = $this->item->orderItems->getItemsTotal(); return $data; } else { throw new NotFoundException(); } }
public function action_get() { if ($this->request->param('id') == 'my') { $cartItems = $this->item->getCartItemsModel(); $cartItems->getCart($this->request->get("uid")); $data = $this->asArrayWith(parent::action_get(), ['items']); $data['total_price'] = $cartItems->getItemsTotal(); return $data; } else { throw new NotFoundException(); } }
/** * @return \App\Model\BaseModel|null * @Vuln\Description("Fetches the category with given ID") * @Vuln\Route("rest", params={"action": "get", "id": "_id_"}) */ public function action_get() { return parent::action_get(); }