public function deleteAction($type, $uid)
    {
        $this->granted('DELETE', $content = $this->getClassContentByTypeAndUid($type, $uid));

        try {
            $this->getEntityManager()->getRepository('BackBee\ClassContent\AbstractClassContent')->deleteContent($content);
            $this->getEntityManager()->flush();
        } catch (\Exception $e) {
            throw new BadRequestHttpException("Unable to delete content with type: `$type` and uid: `$uid`");
        }

        return $this->createJsonResponse(null, 204);
    }