You are here

public function ChecklistapiChecklistClearForm::buildForm in Checklist API 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 ConfirmFormBase::buildForm

File

src/Form/ChecklistapiChecklistClearForm.php, line 67

Class

ChecklistapiChecklistClearForm
Provides a form to clear saved progress for a given checklist.

Namespace

Drupal\checklistapi\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $checklist_id = NULL) {
  $this->checklist = checklistapi_checklist_load($checklist_id);
  $form['#checklist'] = $this->checklist;
  return parent::buildForm($form, $form_state);
}