public function AmazonSesTestForm::buildForm in Amazon SES 2.0.x
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- src/
Form/ AmazonSesTestForm.php, line 109
Class
- AmazonSesTestForm
- Amazon SES test form.
Namespace
Drupal\amazon_ses\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['to'] = [
'#type' => 'textfield',
'#title' => $this
->t('Email'),
'#description' => $this
->t('Enter an email address to send a test mail to.'),
'#default_value' => $this->currentUser
->getEmail(),
'#required' => TRUE,
];
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#button_type' => 'primary',
'#value' => $this
->t('Send'),
];
return $form;
}