/**
  * @Route("/edit/{wiki}", name="wiki_update")
  * @ParamConverter("wiki", class="AppBundle\Model\Wiki")
  * @Method("POST")
  */
 public function updateAction(Wiki $wiki, Request $request)
 {
     $this->denyAccessUnlessGranted('edit', $wiki->getSlug());
     $newName = $request->request->get('name');
     $wiki->setName($newName);
     return $this->redirectToRoute('page_show', array('wiki' => $wiki));
 }
 /**
  * @Route("/{wiki}/{path}", name="page_show", requirements={
  *     "path": "[\d\w-_\/\.+@*]*"
  * }, defaults={
  *     "path": ""
  * }))
  * @ParamConverter("wiki", class="AppBundle\Model\Wiki")
  * @Method("GET")
  */
 public function showAction(Wiki $wiki, $path)
 {
     $this->denyAccessUnlessGranted('show', $wiki->getSlug());
     $page = $wiki->getPage($path);
     return $this->render('page/show.html.twig', array('wiki' => $wiki, 'page' => $page, 'path' => $path));
 }
 public function getWiki($slug)
 {
     $wiki = new Wiki();
     $wiki->setSlug($slug)->setRepository($this->container->get('app.repository')->getRepository($slug));
     return $wiki;
 }