class EmailPicker implements PickerInterface (View source)

A picker for DestinationPicker that allows users specify an email address.

Supported options for the generate method:

  • displayName: the display name of this picker (to be used in the SELECT html element).
  • any other options (except the ones used for the "decode" method) will be used to create the INPUT html element

Supported options for the decode method:

  • checkDNS: should we check if the email address has a valid MX record associated to the domain?
  • strict: should validation warnings be considered as errors?
  • maxlength: the maximum length of the email address

Properties

protected Form $formService

Methods

__construct(Form $formService)

No description

string
getDisplayName(array $options)

Get the display name of this picker (to be used in the SELECT html element).

int
getHeight()

Get the height of this picker (in pixels).

string
generate(string $pickerKey, array $options, mixed|null $selectedValue = null)

Generate the HTML for the picker.

decode(array $data, string $pickerKey, array $options, ArrayAccess $errors = null, string|null $fieldDisplayName = null)

Decode the value received via post.

Details

__construct(Form $formService)

No description

Parameters

Form $formService

string getDisplayName(array $options)

Get the display name of this picker (to be used in the SELECT html element).

Parameters

array $options

Return Value

string

See also

PickerInterface::getDisplayName

int getHeight()

Get the height of this picker (in pixels).

Return Value

int

See also

PickerInterface::getHeight

string generate(string $pickerKey, array $options, mixed|null $selectedValue = null)

Generate the HTML for the picker.

Parameters

string $pickerKey
array $options
mixed|null $selectedValue

Return Value

string

See also

PickerInterface::generate

decode(array $data, string $pickerKey, array $options, ArrayAccess $errors = null, string|null $fieldDisplayName = null)

Decode the value received via post.

Parameters

array $data
string $pickerKey
array $options
ArrayAccess $errors
string|null $fieldDisplayName

See also

PickerInterface::decode