Skip to content
Snippets Groups Projects
Commit 7a721857 authored by Moreau Elise's avatar Moreau Elise
Browse files

add flash, userrepository and group repository in message action

parent d513d294
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ use App\Application\Actions\Action;
use Psr\Log\LoggerInterface;
use Doctrine\ORM\EntityManager;
use Slim\Views\Twig;
use Slim\Flash\Messages;
abstract class MessageAction extends Action
{
......@@ -19,12 +20,14 @@ abstract class MessageAction extends Action
* @param LoggerInterface $logger
* @param MessageRepository $messageRepository
*/
public function __construct(LoggerInterface $logger, EntityManager $em, Twig $twig)
public function __construct(LoggerInterface $logger, EntityManager $em, Twig $twig, Messages $flash)
{
parent::__construct($logger);
$this->messageRepository = $em->getRepository('App\Domain\Message\Message');
$this->groupRepository = $em->getRepository('App\Domain\Group\Group');
$this->userRepository = $em->getRepository('App\Domain\User\User');
$this->em = $em;
$this->twig = $twig;
$this->flash = $flash;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment