Example #1
0
 /**
  * Updates imprint model.
  *
  * @param ImprintModel $imprint
  */
 public function save(ImprintModel $imprint)
 {
     $this->db()->update('imprint')->values(array('paragraph' => $imprint->getParagraph(), 'company' => $imprint->getCompany(), 'name' => $imprint->getName(), 'address' => $imprint->getAddress(), 'addressadd' => $imprint->getAddressAdd(), 'city' => $imprint->getCity(), 'phone' => $imprint->getPhone(), 'fax' => $imprint->getFax(), 'email' => $imprint->getEmail(), 'registration' => $imprint->getRegistration(), 'commercialregister' => $imprint->getCommercialRegister(), 'vatid' => $imprint->getVatId(), 'other' => $imprint->getOther(), 'disclaimer' => $imprint->getDisclaimer()))->where(array('id' => $imprint->getId()))->execute();
 }
Example #2
0
 public function indexAction()
 {
     $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('menuImprint'), array('action' => 'index'));
     $imprintMapper = new ImprintMapper();
     $this->getView()->set('imprint', $imprintMapper->getImprintById(1));
     $this->getView()->set('imprintStyle', $this->getConfig()->get('imprint_style'));
     if ($this->getRequest()->isPost()) {
         $model = new ImprintModel();
         $model->setId(1);
         $model->setParagraph($this->getRequest()->getPost('paragraph'));
         $model->setCompany($this->getRequest()->getPost('company'));
         $model->setName($this->getRequest()->getPost('name'));
         $model->setAddress($this->getRequest()->getPost('address'));
         $model->setAddressAdd($this->getRequest()->getPost('addressadd'));
         $model->setCity($this->getRequest()->getPost('city'));
         $model->setPhone($this->getRequest()->getPost('phone'));
         $model->setFax($this->getRequest()->getPost('fax'));
         $model->setEmail($this->getRequest()->getPost('email'));
         $model->setRegistration($this->getRequest()->getPost('registration'));
         $model->setCommercialRegister($this->getRequest()->getPost('commercialregister'));
         $model->setVatId($this->getRequest()->getPost('vatid'));
         $model->setOther($this->getRequest()->getPost('other'));
         $model->setDisclaimer($this->getRequest()->getPost('disclaimer'));
         $imprintMapper->save($model);
         $this->addMessage('saveSuccess');
         $this->redirect(array('action' => 'index'));
     }
 }