/** * Process 'delete' of one category * * @param int $id */ protected function delete($id) { d('cp'); try { $this->checkAccessPermission('edit_category'); $canEdit = true; } catch (\Exception $e) { $canEdit = false; $res = true; } if ($canEdit) { $Editor = new \Lampcms\Category\Editor($this->Registry); $res = $Editor->delete($id); } Responder::sendJSON(array('deleted' => $id, 'res' => $res)); }
/** * Process 'delete' of one category * * @param int $id */ protected function delete($id) { d('cp'); $Editor = new \Lampcms\Category\Editor($this->Registry); d('cp'); $res = $Editor->delete($id); Responder::sendJSON(array('deleted' => $id, 'res' => $res)); }