You are here

public function LockrRenewForm::buildForm in Lockr 4.x

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/LockrRenewForm.php, line 136

Class

LockrRenewForm
Form handler for Lockr renew cert.

Namespace

Drupal\lockr\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  if (!$this
    ->privateValid()) {

    // Private path not set up.
    return $form;
  }
  $form['renew_certs'] = [
    '#prefix' => '<p>',
    '#markup' => $this
      ->t('Click "Renew Certificate" button below to provision a new connection certificate from Lockr.
         This will be a drop-in replacement for the current certificate, which will have
         access to all of the same secrets. During this process, a backup of the existing certificate
         will be created for recovery purposes.'),
    '#suffix' => '</p>',
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Renew Certificate'),
  ];
  return $form;
}