public function InviteResendForm::buildForm in Invite 8
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/ InviteResendForm.php, line 82
Class
- InviteResendForm
- Class InviteResendForm.
Namespace
Drupal\invite\FormCode
public function buildForm(array $form, FormStateInterface $form_state, InviteInterface $invite = NULL) {
/** @var \Drupal\invite\InviteInterface $invite */
$form['#title'] = $this
->t('Resend invite to @field_invite_email_address', [
'@field_invite_email_address' => $invite->field_invite_email_address->value,
]);
$this->inviteStorage = $invite;
$form['actions']['#type'] = 'actions';
$form['resend_invite'] = [
'#type' => 'submit',
'#title' => $this
->t('Resend Invite'),
'#description' => $this
->t('Resend current invite.'),
'#button_type' => 'primary',
'#value' => $this
->t('Resend Invite'),
];
return $form;
}