ContactFormService
class ContactFormService implements ContactFormServiceInterface
Main services related to ContactForm
Properties
private ConfigServiceInterface | $configService | Stores ConfigServiceInterface | |
private ContactFormEmailInterface | $contactFormEmail | Stores ContactFormEmailInterface | |
private ContactFormFactoryInterface | $contactFormFactory | Stores ContactFormFactoryInterface | |
private Request | $request | Stores current Request | |
private ServiceToolsInterface | $serviceTools | Stores ServiceToolsInterface | |
private ServiceUserInterface | $serviceUser | Stores ServiceUserInterface |
Methods
No description
Creates the contactForm
Shortcut to call ContactFormFactory to create Form
Gets subject if provided by url parameter "s"
Gets referer defined in session
Tests if delay (defined in config) is not too short and if honeypot has not been filled, to avoid being used by bot
Defines the referer to redirect to after submission of form
Details
at line 66
__construct(ConfigServiceInterface $configService, ContactFormEmailInterface $contactFormEmail, ContactFormFactoryInterface $contactFormFactory, RequestStack $requestStack, ServiceToolsInterface $serviceTools, ServiceUserInterface $serviceUser)
at line 86
ContactForm
create()
Creates the contactForm
at line 111
Form
createForm(string $name, ContactForm $contactForm, ContactFormEvent $event)
Shortcut to call ContactFormFactory to create Form
at line 119
string|null
getSubject()
Gets subject if provided by url parameter "s"
at line 129
string|null
getReferer()
Gets referer defined in session
at line 145
bool
isNotBot($username)
Tests if delay (defined in config) is not too short and if honeypot has not been filled, to avoid being used by bot
at line 158
setReferer()
Defines the referer to redirect to after submission of form
at line 166
string|null
sendEmail(Form $form, ContactFormEvent $event)
Sends email resulting from submission of form