public function przetargi_biezaceAction() { $this->setTitle('Bieżące postępowania przetargowe'); $this->setUrl('przetargi_biezace.html'); $this->setTemplate('auction/list.html'); $auctionService = new Wsm_Db_Auction(); $list = $auctionService->getCurrent(); $this->addToView('auctionList', $list); }
public function saveAction() { $auction = new Wsm_Auction(); if ($this->has('id')) { $auction->setId($this->get('id')); } $auction->setTitle($this->get('title')); $auction->setContent($this->get('content')); $auction->setSignature($this->get('signature')); $auction->setDate($this->get('date')); $auction->setDateExpiry($this->get('dateExpiry')); $auctionService = new Wsm_Db_Auction(); try { $auctionService->save($auction); $this->redirect('auctions/index?msg=saved'); } catch (Exception $e) { $this->redirect('auctions/index?msg=save_error'); } }