Exemplo n.º 1
0
 /**
  * action delete
  *
  * @param \GK\Stdapp\Domain\Model\Message $message
  * @return void
  */
 public function deleteAction(\GK\Stdapp\Domain\Model\Message $message)
 {
     $customer = $this->portalUser->getCustomer()->_loadRealInstance();
     $customer->removeMessage($message);
     $this->customerRepository->update($customer);
     $this->flashMessageContainer->add('Your Message was deleted.');
     $this->redirect('edit');
 }
Exemplo n.º 2
0
 /**
  * action edit
  *
  * @param \GK\Stdapp\Domain\Model\Customer $customer
  * @return void
  */
 public function editAction(\GK\Stdapp\Domain\Model\Customer $customer = NULL)
 {
     if ($customer == NULL) {
         $customer = $this->portalUser->getCustomer()->_loadRealInstance();
     }
     $this->view->assign('customer', $customer);
     $this->view->assign('feuser', $this->portalUser);
     $this->view->assign('submitMsg', $this->resourceRepository->findByType(10, $customer)->getFirst());
 }
 /**
  * 
  * Move one resource up
  * @param \GK\Stdapp\Domain\Model\Resource $resource
  */
 public function moveUpAction(\GK\Stdapp\Domain\Model\Resource $resource)
 {
     $resources = $this->resourceRepository->findByType($this->type, $this->portalUser->getCustomer()->_loadRealInstance());
     foreach ($resources as $res) {
         if ($res == $resource && $lastres != NULL) {
             $pos = $res->getSort();
             $lastpos = $lastres->getSort();
             if ($pos == $lastpos) {
                 $res->setSort($pos);
                 $lastres->setSort($pos + 1);
             } else {
                 $res->setSort($lastpos);
                 $lastres->setSort($pos);
             }
             $this->resourceRepository->update($res);
             $this->resourceRepository->update($lastres);
             break;
         }
         $lastres = $res;
     }
     $this->flashMessageContainer->add('Your Resource was moved.');
     $this->redirect('edit');
 }
Exemplo n.º 4
0
 /**
  * action edit
  *
  * @param \GK\Stdapp\Domain\Model\CustomerSubtype $editCustomerSubtype
  * @return void
  */
 public function editAction(\GK\Stdapp\Domain\Model\CustomerSubtype $editCustomerSubtype = NULL)
 {
     $customerSubtypes = $this->customerSubtypeRepository->findByCustomer($this->portalUser->getCustomer()->_loadRealInstance());
     $this->view->assign('customerSubtypes', $customerSubtypes);
     $this->view->assign('editCustomerSubtype', $editCustomerSubtype);
 }