Fab 4 years ago
parent
commit
b2dabde4fc
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      ShopBundle/Controller/Admin/NewsController.php
  2. +3
    -2
      ShopBundle/Services/GlobalParam.php

+ 1
- 1
ShopBundle/Controller/Admin/NewsController.php View File

foreach ($users as $user) { foreach ($users as $user) {
$message = new \Swift_Message('[Place du Local] '.$news->getTitle()); $message = new \Swift_Message('[Place du Local] '.$news->getTitle());
$message->addTo($user->getEmail()) $message->addTo($user->getEmail())
->addFrom('no-reply@opendistrib.net', 'Place du Local')
->addFrom($this->getParameter('app.noreply_email'), $this->getParameter('app.site_name'))
->setBody($this->renderView('mail/news.html.twig', [ ->setBody($this->renderView('mail/news.html.twig', [
'message' => $news->getDescription(), 'message' => $news->getDescription(),
'image' => $news->getImage(), 'image' => $news->getImage(),

+ 3
- 2
ShopBundle/Services/GlobalParam.php View File



namespace Lc\ShopBundle\Services; namespace Lc\ShopBundle\Services;


use App\Repository\HubRepository;
use Lc\ShopBundle\Context\GlobalParamInterface; use Lc\ShopBundle\Context\GlobalParamInterface;
use Lc\ShopBundle\Repository\MerchantRepository;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;


class GlobalParam class GlobalParam
{ {
private $security;
protected $security;


public function __construct(Security $security) public function __construct(Security $security)
{ {
return false ; return false ;
} }
} }

} }

Loading…
Cancel
Save