/**
* Create HTML template for ticket invitation
*
* @param Ticket $ticket
*
* @return string
*/
public function generateHTML(Ticket $ticket)
{
$twig = $this->templating;
$url = $this->router->generate('event_ticket_check', array('ticket' => $ticket->getId(), 'hash' => $ticket->getHash()), true);
$this->qrCode->setText($url);
$this->qrCode->setSize(105);
$this->qrCode->setPadding(0);
$qrCodeBase64 = base64_encode($this->qrCode->get());
$templateContent = $twig->loadTemplate('StfalconEventBundle:Ticket:show_pdf.html.twig');
$body = $templateContent->render(array('ticket' => $ticket, 'qrCodeBase64' => $qrCodeBase64, 'path' => realpath($this->kernel->getRootDir() . '/../web') . '/'));
return $body;
}