-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return route after sending mail ? #5
Comments
The session variable namespace AppBundle\Listener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use c975L\ContactFormBundle\Event\ContactFormEvent;
class ContactFormListener implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array(
ContactFormEvent::SEND_FORM => 'sendForm',
);
}
public function sendForm($event)
{
//Updates url to redirect
$event->getRequest()->getSession()->set('redirectUrl', 'https://example.com');
}
} |
As I think it's more logical, I've moved the |
Yes you're right! The event is not dispatched... I have also mixed in my mind Listener and Subscriber, I will also correct it in the README.md. |
i'm totally noob on PR, i'm waiting for you to fix it :-) |
I was (and always am) a noob for PRs and other matters. I learn by making ;-) Concerning the solution, in fact I had to inject EventDispatcherInterface. That's solved with v1.9.5.1 |
and thanks for the advices about PR. |
Doing too many things at the same time... |
tested Ok, thanks ! |
Thanks for the link on PRs that answered me a question on how to treat the PRs on the maintainer’s side :-) |
you're welcome ! |
hi, once overrided email layout, works fine, thank you ! but form still displayed....
This is a question : is there a way to invoke a route after email sending ?
Alain
The text was updated successfully, but these errors were encountered: