function BreakLockForm::buildForm

Same name in other branches
  1. 8.9.x core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::buildForm()
  2. 10 core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::buildForm()
  3. 11.x core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::buildForm()

Overrides EntityConfirmFormBase::buildForm

File

core/modules/views_ui/src/Form/BreakLockForm.php, line 99

Class

BreakLockForm
Builds the form to break the lock of an edited view.

Namespace

Drupal\views_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
    if (!$this->tempStore
        ->getMetadata($this->entity
        ->id())) {
        $form['message']['#markup'] = $this->t('There is no lock on view %name to break.', [
            '%name' => $this->entity
                ->id(),
        ]);
        return $form;
    }
    return parent::buildForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.