You are here

public function DeleteForm::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 FormInterface::buildForm

2 calls to DeleteForm::buildForm()
DeleteActionForm::buildForm in src/Form/DeleteActionForm.php
Form constructor.
DeleteActivityForm::buildForm in src/Form/DeleteActivityForm.php
Form constructor.
2 methods override DeleteForm::buildForm()
DeleteActionForm::buildForm in src/Form/DeleteActionForm.php
Form constructor.
DeleteActivityForm::buildForm in src/Form/DeleteActivityForm.php
Form constructor.

File

src/Form/DeleteForm.php, line 65

Class

DeleteForm
Delete base form.

Namespace

Drupal\activity\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $label = '') {
  $form['delete_activities'] = [
    '#type' => 'label',
    '#title' => '',
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => t('Delete'),
  ];
  $form['cancel_delete'] = [
    '#title' => $this
      ->t('Cancel'),
    '#type' => 'link',
    '#url' => Url::fromUri('internal:/admin/activity'),
  ];
  return $form;
}