You are here

public function WebformInvitationDownloadForm::buildForm in Webform Invitation 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/WebformInvitationDownloadForm.php \Drupal\webform_invitation\Form\WebformInvitationDownloadForm::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

src/Form/WebformInvitationDownloadForm.php, line 53

Class

WebformInvitationDownloadForm
Allows to download the list of generated codes.

Namespace

Drupal\webform_invitation\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, WebformInterface $webform = NULL) {
  $form['webform'] = [
    '#type' => 'value',
    '#value' => $webform,
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Download'),
    '#button_type' => 'primary',
  ];
  return $form;
}