/** * action update * * @param \GK\Stdapp\Domain\Model\Message $message * @return void */ public function updateAction(\GK\Stdapp\Domain\Model\Message $message) { if ($message->getUid() > 0) { $this->messageRepository->update($message); $this->flashMessageContainer->add('Your Message was updated.'); } else { $customer = $this->portalUser->getCustomer()->_loadRealInstance(); $customer->addMessage($message); $this->customerRepository->update($customer); $this->flashMessageContainer->add('Your Message was added.'); } $this->redirect('edit'); }
/** * @test */ public function setSortForIntegerSetsSort() { $this->fixture->setSort(12); $this->assertSame(12, $this->fixture->getSort()); }
/** * action update * * @param \GK\Stdapp\Domain\Model\Message $message * @return void */ public function updateMessageAction(\GK\Stdapp\Domain\Model\Message $message) { if ($message->getUid() > 0) { $this->messageRepository->update($message); $this->flashMessageContainer->add('Your Message was updated.'); } else { $this->messageRepository->add($message); $this->flashMessageContainer->add('Your Message was added.'); } $this->redirect('editMessage'); }