public function showAction(CategoryService $categoryService)
 {
     parent::initFrontEnd();
     $rep_img = $this->getDoctrine()->getManager()->getRepository('WellnessCoreBundle:Image');
     $CurrentLogoCategory = $rep_img->findOneBy(array('categoryService' => $categoryService->getId()));
     if ($CurrentLogoCategory == null) {
         throw $this->createNotFoundException("Pas de logo categorie trouvé !");
     }
     return $this->render('WellnessCoreBundle:FrontEnd/Category:show.html.twig', array('listCategoryWithLogo' => $this->getListCategoryWithLogo(), 'listImagesSlider' => $this->getListImageSlider(), 'CurrentLogoCategory' => $CurrentLogoCategory));
 }
 public function deleteAction(Request $request, CategoryService $categoryService)
 {
     $form = $this->createDeleteForm($categoryService->getId());
     $form->handleRequest($request);
     if ($form->isValid()) {
         $em = $this->getDoctrine()->getManager();
         $entity = $em->getRepository('WellnessCoreBundle:CategoryService')->find($categoryService->getId());
         if (!$entity) {
             throw $this->createNotFoundException('Unable to find CategoryService entity.');
         }
         $em->remove($entity);
         $em->flush();
     }
     return $this->redirect($this->generateUrl('admin_categoryservice'));
 }