function MailerCaptureTestForm::buildForm
Same name and namespace in other branches
- main core/modules/mailer/tests/modules/mailer_capture_test/src/Form/MailerCaptureTestForm.php \Drupal\mailer_capture_test\Form\MailerCaptureTestForm::buildForm()
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
-
core/
modules/ mailer/ tests/ modules/ mailer_capture_test/ src/ Form/ MailerCaptureTestForm.php, line 45
Class
- MailerCaptureTestForm
- Mailer capture test form.
Namespace
Drupal\mailer_capture_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) : array {
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['send'] = [
'#type' => 'submit',
'#value' => 'Send Mail',
'#button_type' => 'primary',
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.