private $supportUrl;
/**
- * Url for the wallabag instance.
+ * Url for the wallabag instance (only used for image in the HTML email template).
*
* @var string
*/
* @param \Twig_Environment $twig
* @param string $senderEmail
* @param string $senderName
- * @param string $supportUrl
- * @param string $wallabagUrl
+ * @param string $supportUrl wallabag support url
+ * @param string $wallabagUrl wallabag instance url
*/
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
{
*/
public function sendAuthCode(TwoFactorInterface $user)
{
- $template = $this->twig->loadTemplate('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig');
+ $template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig');
- $subject = $template->renderBlock('subject', array());
+ $subject = $template->renderBlock('subject', []);
$bodyHtml = $template->renderBlock('body_html', [
'user' => $user->getName(),
'code' => $user->getEmailAuthCode(),