Remove privacyEvent.yaml + autowire logger.

This commit is contained in:
Pol Dellaiera 2021-05-06 15:03:45 +02:00
parent 11036e84f6
commit 5146419e9a
4 changed files with 9 additions and 11 deletions

View File

@ -41,6 +41,11 @@ services:
tags: tags:
- { name: 'chill.menu_builder' } - { name: 'chill.menu_builder' }
Chill\PersonBundle\EventSubscriber\:
resource: '../src/EventSubscriber/'
tags:
- { name: kernel.event_subscriber }
chill.person.security.authorization.person: chill.person.security.authorization.person:
class: Chill\PersonBundle\Security\Authorization\PersonVoter class: Chill\PersonBundle\Security\Authorization\PersonVoter
arguments: arguments:

View File

@ -1,7 +0,0 @@
services:
Chill\PersonBundle\Privacy\PrivacyEventSubscriber:
arguments:
$logger: '@chill.main.logger'
$token: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
tags:
- { name: kernel.event_subscriber }

View File

@ -66,7 +66,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
$loader->load('services/exports.yaml'); $loader->load('services/exports.yaml');
$loader->load('services/fixtures.yaml'); $loader->load('services/fixtures.yaml');
$loader->load('services/search.yaml'); $loader->load('services/search.yaml');
$loader->load('services/privacyEvent.yaml');
$loader->load('services/command.yaml'); $loader->load('services/command.yaml');
$loader->load('services/form.yaml'); $loader->load('services/form.yaml');
$loader->load('services/templating.yaml'); $loader->load('services/templating.yaml');

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Chill\PersonBundle\Privacy; namespace Chill\PersonBundle\EventSubscriber;
/* /*
* Chill is a software for social workers * Chill is a software for social workers
@ -27,6 +27,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Privacy\AccompanyingPeriodPrivacyEvent; use Chill\PersonBundle\Privacy\AccompanyingPeriodPrivacyEvent;
use Chill\PersonBundle\Privacy\PrivacyEvent;
class PrivacyEventSubscriber implements EventSubscriberInterface class PrivacyEventSubscriber implements EventSubscriberInterface
{ {
@ -46,9 +47,9 @@ class PrivacyEventSubscriber implements EventSubscriberInterface
* *
* @param LoggerInterface $logger * @param LoggerInterface $logger
*/ */
public function __construct(LoggerInterface $logger, TokenStorageInterface $token) public function __construct(LoggerInterface $chillMain, TokenStorageInterface $token)
{ {
$this->logger = $logger; $this->logger = $chillMain;
$this->token = $token; $this->token = $token;
} }