public function deleteAction($id)
	{
		$this->denyAccessUnlessGranted('ROLE_ADMIN', null, 'Unable to access this page !');
		$postManager = $this->get('asf_document.post.manager');
		
		$post = $postManager->getRepository()->findOneBy(array('id' => $id));

		try {
			if ( is_null($post) )
				throw new \Exception($this->get('translator')->trans('An error occurs when deleting the post', array(), 'asf_document'));
			
			$postManager->getEntityManager()->remove($post);
			$postManager->getEntityManager()->flush();
			
			if ( $this->has('asf_layout.flash_message') ) {
				$this->get('asf_layout.flash_message')->success($this->get('translator')->trans('The post "%name%" successfully deleted', array('%name%' => $post->getTitle()), 'asf_document'));
			}
			
		} catch (\Exception $e) {
			if ( $this->has('asf_layout.flash_message') ) {
				$this->get('asf_layout.flash_message')->danger($e->getMessage());
			}
		}
		
		return $this->redirect($this->get('router')->generate('asf_document_post_list'));
	}