function deletePost($postId) { Session::checkSuperAdminPermission(); $db = new DB(); $post = new \SKS\DB\Entity\Post(); $post = $db->findById($post, $postId); $db->remove($post); $this->view->message = "Post delete successfully."; $this->managePost(); }