Exemplo n.º 1
0
 /**
  * Remove a Extensions Group
  */
 public function deleteAction()
 {
     $this->view->breadcrumb = Snep_Breadcrumb::renderPath(array($this->view->translate("Manage"), $this->view->translate("Extension Groups"), $this->view->translate("Delete Extension Groups")));
     $id = $this->_request->getParam('id');
     $confirm = $this->_request->getParam('confirm');
     if ($confirm == 1) {
         Snep_ExtensionsGroups_Manager::delete($id);
         $this->_redirect($this->getRequest()->getControllerName());
     }
     $extensions = Snep_ExtensionsGroups_Manager::getExtensionsGroup($id);
     if (count($extensions) > 0) {
         $this->_redirect($this->getRequest()->getControllerName() . '/migration/id/' . $id);
     } else {
         $this->view->message = $this->view->translate("The extension group will be deleted. Are you sure?.");
         $form = new Snep_Form();
         $form->setAction($this->getFrontController()->getBaseUrl() . '/' . $this->getRequest()->getControllerName() . '/delete/id/' . $id . '/confirm/1');
         $form->getElement('submit')->setLabel($this->view->translate('Yes'));
         $this->view->form = $form;
     }
 }