/** */ public function deleteAction() { // Try to load the chosen user $templateId = $this->getRequest()->getParam('id'); $template = $this->_templateSrv->load($templateId); if (empty($template)) { throw new AppEx\NotFoundException('Template ' . $templateId . ' not found', 404); } // Check permissions $this->_helper->allowed('delete', $template); // Remove the user $this->_templateSrv->delete($templateId); $this->view->data = true; }