interface ContactFormServiceInterface

Interface to be called for DI for ContactFormServiceInterface related services

Methods

create()

Creates the contactForm

Form
createForm(string $name, ContactForm $contactForm, ContactFormEvent $event)

Shortcut to call ContactFormFactory to create Form

string|null
getSubject()

Gets subject if provided by url parameter "s"

string|null
getReferer()

Gets referer defined in session

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

setReferer()

Defines the referer to redirect to after submission of form

string|null
sendEmail(Form $form, ContactFormEvent $event)

Sends email resulting from submission of form

Details

at line 27
ContactForm create()

Creates the contactForm

Return Value

ContactForm

at line 33
Form createForm(string $name, ContactForm $contactForm, ContactFormEvent $event)

Shortcut to call ContactFormFactory to create Form

Parameters

string $name
ContactForm $contactForm
ContactFormEvent $event

Return Value

Form

at line 39
string|null getSubject()

Gets subject if provided by url parameter "s"

Return Value

string|null

at line 45
string|null getReferer()

Gets referer defined in session

Return Value

string|null

at line 51
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

Parameters

$username

Return Value

bool

at line 56
setReferer()

Defines the referer to redirect to after submission of form

at line 62
string|null sendEmail(Form $form, ContactFormEvent $event)

Sends email resulting from submission of form

Parameters

Form $form
ContactFormEvent $event

Return Value

string|null