public function deleteTopicAction(Request $request, $id)
{
$topicService = $this->get('newscoop_newscoop.topic_service');
$em = $this->container->get('em');
$topic = $em->getRepository('Newscoop\\NewscoopBundle\\Entity\\Topic')->findOneBy(array('id' => $id));
if (!$topic) {
throw new NotFoundHttpException('Topic was not found');
}
$topicService->deleteTopic($topic);
$response = new Response();
$response->setStatusCode(204);
return $response;
}