Example #1
0
 /**
  * Delete the domain profile 
  * @return unknown_type
  */
 public function delprofileAction()
 {
     $request = $this->getRequest();
     $this->view->title = $this->translator->translate("Domain Profiles");
     $this->view->description = $this->translator->translate("Here you can see the domain profile list.");
     if ($request->getParam('id')) {
         $profileId = $request->getParam('id');
         if (is_numeric($profileId)) {
             if (0 == DomainsNichandle::isUsed($profileId)) {
                 $records = DomainsProfiles::delProfile($profileId, $this->customer['customer_id']);
                 $this->_helper->redirector('profiles', 'domains', 'default', array('mex' => 'The task requested has been executed successfully.', 'status' => 'success'));
             } else {
                 $this->_helper->redirector('profiles', 'domains', 'default', array('mex' => 'You cannot delete the profile because it is connected to a domain.', 'status' => 'danger'));
             }
         }
     }
     $this->_helper->redirector('profiles', 'domains', 'default', array('mex' => 'A problem has been occurred during the request.', 'status' => 'danger'));
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->_helper->viewRenderer('profiles');
 }