You are here

public function ScannerConfirmForm::buildForm in Search and Replace Scanner 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 ConfirmFormBase::buildForm

File

src/Form/ScannerConfirmForm.php, line 52

Class

ScannerConfirmForm
Form for configure messages.

Namespace

Drupal\scanner\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $store = $this->tempStore
    ->get('scanner');
  $form = parent::buildForm($form, $form_state);
  $msg = '<span>' . 'Search for' . ':</span> <strong>' . $store
    ->get('search') . '</strong></span><br/><span>' . 'Replace with' . ':</span><strong> ' . $store
    ->get('replace') . '</strong></span>';
  $form['description'] = [
    '#type' => 'markup',
    '#markup' => $msg,
  ];
  return $form;
}