public function deleteAction() { $this->view->title = "Suppression d'une sous-catégorie"; if ($this->view->aclIsAllowed($this->_moduleTitle, 'manage', true)) { // Get the product line id $id = (int) $this->_getParam($this->_paramId); // generate the form $returnUrl = $this->_moduleTitle . "/" . $this->_name . "/" . $this->_defaultAction . "/"; $this->view->assign('return', $this->view->baseUrl() . "/" . $returnUrl); $oSubCategories = new SubCategoriesObject(); $select = $oSubCategories->getAll(null, false, $id); $data = $this->_db->fetchRow($select); $this->view->subcat = $data; if ($this->_request->isPost()) { $del = $this->_request->getPost('delete'); if ($del && $id > 0) { // get all'; $oSubCategories->delete($id); } $this->_redirect($returnUrl); } } }