+
+ /**
+ * Share entry content.
+ *
+ * @param Entry $entry
+ *
+ * @Route("/share/{uuid}", requirements={"uuid" = ".+"}, name="share")
+ * @Cache(maxage="25200", public=true)
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ public function shareEntryAction(Entry $entry)
+ {
+ return $this->render(
+ '@WallabagCore/themes/share.html.twig',
+ array('entry' => $entry)
+ );
+ }
+
+ /**
+ * @param Entry $entry
+ */
+ private function generateEntryUuid(Entry $entry)
+ {
+ $entry->generateUuid();
+ $em = $this->getDoctrine()->getManager();
+ $em->persist($entry);
+ $em->flush();
+ }