class ContactFormEvent extends Event

Events to be dispatched throughout the lifecycle of ContactForm

Constants

CREATE_FORM

Used to dispatch event "create.form"

SEND_FORM

Used to dispatch event "send.form"

Properties

protected ContactForm $formData Stores data issued fy form
protected array $emailData Stores data used to create email
protected string $error Stores error
protected bool $receiveCopy If user wants to receive a copy of the email sent by ContactForm
protected Request $request Stores Request

Methods

__construct(Request $request, ContactForm $formData = null, array $emailData = null)

No description

getFormData()

Get formData

setEmailData(array $emailData)

Set emailData

array
getEmailData()

Get emailData

setReceiveCopy(bool $receiveCopy)

Set receiveCopy

bool
getReceiveCopy()

Get receiveCopy

Request
getRequest()

Get request

setError(string|null $error)

Set error

string|null
getError()

Get error

Details

at line 63
__construct(Request $request, ContactForm $formData = null, array $emailData = null)

Parameters

Request $request
ContactForm $formData
array $emailData

at line 74
ContactForm getFormData()

Get formData

Return Value

ContactForm

at line 83
setEmailData(array $emailData)

Set emailData

Parameters

array $emailData

at line 92
array getEmailData()

Get emailData

Return Value

array

at line 101
setReceiveCopy(bool $receiveCopy)

Set receiveCopy

Parameters

bool $receiveCopy

at line 110
bool getReceiveCopy()

Get receiveCopy

Return Value

bool

at line 119
Request getRequest()

Get request

Return Value

Request

at line 128
setError(string|null $error)

Set error

Parameters

string|null $error

at line 137
string|null getError()

Get error

Return Value

string|null