Controller/WikiTagController.php
changeset 65 ba6b8e38d90e
parent 63 774ba82dca59
child 67 989d9e117586
equal deleted inserted replaced
64:caeb4c8b5487 65:ba6b8e38d90e
   270         $tag_label = $this->getRequest()->request->get('value');
   270         $tag_label = $this->getRequest()->request->get('value');
   271         
   271         
   272         
   272         
   273         try
   273         try
   274         {
   274         {
   275             $this->get('wiki_tag.document')->addTag($id_doc, $tag_label);
   275             $this->get('wiki_tag.document')->addTags($id_doc, $tag_label);
   276         }
   276         }
   277         catch (WikiTagServiceException $e)
   277         catch (WikiTagServiceException $e)
   278         {
   278         {
   279             return new Response(json_encode(array('error' => $e->getErrorCode(), 'message' => $e->getMessage())),$e->getCode());
   279             return new Response(json_encode(array('error' => $e->getErrorCode(), 'message' => $e->getMessage())),$e->getCode());
   280         }
   280         }
   281 
   281         $this->getDoctrine()->getEntityManager()->flush();
       
   282 
       
   283         
   282         return $this->renderDocTags($id_doc, $this->getRequest()->request->get('wikitag_document_profile'));
   284         return $this->renderDocTags($id_doc, $this->getRequest()->request->get('wikitag_document_profile'));
   283     }
   285     }
   284 
   286 
   285 
   287 
   286     /**
   288     /**