コード例 #1
0
 /**
  * Remove ServicePack to a Customer.
  *
  */
 protected function removecustomerAction()
 {
     if (!$this->getRequest()->isPost()) {
         throw new AppEx\UnexpectedException("Resquest must be POST");
     }
     $data = $this->_helper->requestData();
     $ssId = $data['ssId'];
     $orgId = $data['orgId'];
     if (!strlen((string) $ssId)) {
         throw new AppEx\InvalidArgumentException("Null Identifier for supplementary service recived");
     }
     if (!isset($orgId) && !strlen($orgId)) {
         throw new AppEx\InvalidArgumentException("Null Identifier for organization recived");
     }
     $ss = $this->_ssSrv->load($ssId);
     if (empty($ss)) {
         throw new AppEx\NotFoundException("Supplementary service {$ssId} not found", 404);
     }
     $org = $this->_orgSrv->load($orgId);
     if (empty($org)) {
         throw new AppEx\NotFoundException("Organization {$orgId} not found", 404);
     }
     $this->_helper->allowed('read', $org);
     $this->_helper->allowed('unassign', $ss);
     $this->view->data = $this->_ssSrv->removeCustomer($ss, $org);
 }
コード例 #2
0
 public function init()
 {
     $this->supplServicesSrv = Application\Service\SupplServicesService::getInstance();
 }