public function unpublish($preBill) { if ($preBill instanceof PreBillModel) { $mapper = PreBillMapper::getInstance(); $result = $mapper->unpublish($preBill->getId()); if ($result) { \App::audit('Unpublished prebill with Id ' . $preBill->getId(), $preBill); return $result; } } else { throw new AppEx\ValidateException('Invalid prebill'); } }
protected function setUp() { parent::setUp(); $this->_mapper = \Application\Model\Mapper\PreBillMapper::getInstance(); }