public function EntityDeleteConfirmationForm::buildForm in Entity Delete 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/ EntityDeleteConfirmationForm.php, line 26
Class
- EntityDeleteConfirmationForm
- Class EntityDeleteConfirmationForm.
Namespace
Drupal\entity_delete\FormCode
public function buildForm(array $form, FormStateInterface $form_state, array $param = NULL) {
$form['title'] = [
'#markup' => $this
->t('<h1>Are you sure you want to delete?</h1><br>'),
];
$form['delete'] = [
'#type' => 'submit',
'#value' => 'Confirm',
];
$form['cancel'] = [
'#type' => 'submit',
'#value' => 'Cancel',
];
return $form;
}