You are here

public function DeleteActivityForm::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/DeleteActivityForm.php, line 23

Class

DeleteActivityForm
Delete activities form.

Namespace

Drupal\activity\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $eventId = '') {
  $form = parent::buildForm($form, $form_state);
  $form['delete_activities'] = [
    '#type' => 'label',
    '#title' => t('Delete this event? This cannot be undone.'),
  ];
  $form['cancel_delete'] = [
    '#title' => $this
      ->t('Cancel'),
    '#type' => 'link',
    '#url' => Url::fromUri('internal:/admin/activity'),
  ];
  return $form;
}