You are here

public function BatchUpdateForm::buildForm in Entity Usage 8.3

Same name and namespace in other branches
  1. 8 src/Form/BatchUpdateForm.php \Drupal\entity_usage\Form\BatchUpdateForm::buildForm()
  2. 8.2 src/Form/BatchUpdateForm.php \Drupal\entity_usage\Form\BatchUpdateForm::buildForm()

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/BatchUpdateForm.php, line 52

Class

BatchUpdateForm
Form to launch batch tracking of existing entities.

Namespace

Drupal\entity_usage\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['description'] = [
    '#markup' => $this
      ->t("This page allows you to delete and re-generate again all entity usage statistics in your system.<br /><br />You may want to check the settings page to fine-tune what entities should be tracked, and other options."),
  ];
  $form['actions'] = [
    '#type' => 'actions',
  ];
  $form['actions']['submit'] = [
    '#type' => 'submit',
    '#button_type' => 'primary',
    '#value' => $this
      ->t('Recreate all entity usage statistics'),
  ];
  return $form;
}