mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Make wallabag_url a Twig global
This commit is contained in:
parent
09dcee3fc6
commit
b921abf173
4 changed files with 3 additions and 15 deletions
|
@ -60,6 +60,7 @@ twig:
|
|||
form_themes:
|
||||
- "@SpiriitFormFilter/Form/form_div_layout.html.twig"
|
||||
globals:
|
||||
wallabag_url: '%domain_name%'
|
||||
registration_enabled: '%fosuser_registration%'
|
||||
|
||||
# Doctrine Configuration
|
||||
|
|
|
@ -103,8 +103,6 @@ class DeveloperController extends AbstractController
|
|||
*/
|
||||
public function howtoFirstAppAction()
|
||||
{
|
||||
return $this->render('Developer/howto_app.html.twig', [
|
||||
'wallabag_url' => $this->getParameter('domain_name'),
|
||||
]);
|
||||
return $this->render('Developer/howto_app.html.twig');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -257,7 +257,6 @@ class ConfigController extends AbstractController
|
|||
'username' => $user->getUsername(),
|
||||
'token' => $config->getFeedToken(),
|
||||
],
|
||||
'wallabag_url' => $this->getParameter('domain_name'),
|
||||
'enabled_users' => $userRepository->getSumEnabledUsers(),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -50,27 +50,18 @@ class AuthCodeMailer implements AuthCodeMailerInterface
|
|||
*/
|
||||
private $supportUrl;
|
||||
|
||||
/**
|
||||
* Url for the wallabag instance (only used for image in the HTML email template).
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $wallabagUrl;
|
||||
|
||||
/**
|
||||
* @param string $senderEmail
|
||||
* @param string $senderName
|
||||
* @param string $supportUrl wallabag support url
|
||||
* @param string $wallabagUrl wallabag instance url
|
||||
*/
|
||||
public function __construct(MailerInterface $mailer, Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
|
||||
public function __construct(MailerInterface $mailer, Environment $twig, $senderEmail, $senderName, $supportUrl)
|
||||
{
|
||||
$this->mailer = $mailer;
|
||||
$this->twig = $twig;
|
||||
$this->senderEmail = $senderEmail;
|
||||
$this->senderName = $senderName;
|
||||
$this->supportUrl = $supportUrl;
|
||||
$this->wallabagUrl = $wallabagUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +76,6 @@ class AuthCodeMailer implements AuthCodeMailerInterface
|
|||
'user' => $user->getName(),
|
||||
'code' => $user->getEmailAuthCode(),
|
||||
'support_url' => $this->supportUrl,
|
||||
'wallabag_url' => $this->wallabagUrl,
|
||||
]);
|
||||
$bodyText = $template->renderBlock('body_text', [
|
||||
'user' => $user->getName(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue