1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Add CraueConfig for internal settings

This commit is contained in:
Jeremy Benoist 2016-01-21 08:53:09 +01:00
parent 26975877d7
commit 63e40f2d7c
29 changed files with 208 additions and 173 deletions

View file

@ -4,6 +4,7 @@ namespace Wallabag\UserBundle\Mailer;
use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface;
use Craue\ConfigBundle\Util\Config;
/**
* Custom mailer for TwoFactorBundle email.
@ -60,17 +61,16 @@ class AuthCodeMailer implements AuthCodeMailerInterface
* @param \Twig_Environment $twig
* @param string $senderEmail
* @param string $senderName
* @param string $supportUrl
* @param string $wallabagUrl
* @param Config $craueConfig Craue\Config instance to get wallabag support url from database
*/
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, Config $craueConfig)
{
$this->mailer = $mailer;
$this->twig = $twig;
$this->senderEmail = $senderEmail;
$this->senderName = $senderName;
$this->supportUrl = $supportUrl;
$this->wallabagUrl = $wallabagUrl;
$this->supportUrl = $craueConfig->get('wallabag_support_url');
$this->wallabagUrl = $craueConfig->get('wallabag_url');
}
/**

View file

@ -6,8 +6,7 @@ services:
- "@twig"
- "%scheb_two_factor.email.sender_email%"
- "%scheb_two_factor.email.sender_name%"
- "%wallabag_support_url%"
- "%wallabag_url%"
- "@craue_config"
wallabag_user.password_resetting:
class: Wallabag\UserBundle\EventListener\PasswordResettingListener