You are here

public function ClearReplicationQueueForm::buildForm in Workspace 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/ClearReplicationQueueForm.php, line 25

Class

ClearReplicationQueueForm
Class ClearReplicationQueueForm.

Namespace

Drupal\workspace\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['clear_queue'] = array(
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Clear replication queue'),
  );
  $form['clear_queue']['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Clear queue'),
  ];
  $form['clear_queue']['description'] = [
    '#type' => 'markup',
    '#markup' => '<div class="description">' . $this
      ->t('All replications will be marked as failed and removed from the cron queue, except those that are in progress.') . '</div>',
  ];
  return $form;
}