1 | <?php |
||
21 | class FlashListener implements EventSubscriberInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected static $successMessages = [ |
||
27 | Events::REGISTRATION_COMPLETED => 'silex_user.registration.flash.user_created' |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * @var Session |
||
32 | */ |
||
33 | protected $session; |
||
34 | |||
35 | /** |
||
36 | * @var TranslatorInterface |
||
37 | */ |
||
38 | protected $translator; |
||
39 | |||
40 | /** |
||
41 | * Constructor. |
||
42 | * |
||
43 | * @param Session $session |
||
44 | * @param TranslatorInterface $translator |
||
45 | */ |
||
46 | public function __construct(Session $session, TranslatorInterface $translator) |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public static function getSubscribedEvents() |
||
61 | |||
62 | /** |
||
63 | * Adds a success flash message. |
||
64 | * |
||
65 | * @param Event $event |
||
66 | * @param string $eventName |
||
67 | */ |
||
68 | public function addSuccessFlash(Event $event, $eventName) |
||
76 | } |
||
77 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.