public function DeleteActionForm::buildForm in Activity 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 DeleteForm::buildForm
File
- src/
Form/ DeleteActionForm.php, line 23
Class
- DeleteActionForm
- Delete action form.
Namespace
Drupal\activity\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $label = '') {
$form = parent::buildForm($form, $form_state);
$form['delete_activities'] = [
'#type' => 'label',
'#title' => t('Delete this action? This cannot be undone.'),
];
$form['cancel_delete'] = [
'#title' => $this
->t('Cancel'),
'#type' => 'link',
'#url' => Url::fromUri('internal:/activities/all'),
];
return $form;
}