function BreakLockForm::submitForm

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

Overrides EntityForm::submitForm

File

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

Class

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

Namespace

Drupal\views_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $this->tempStore
        ->delete($this->entity
        ->id());
    $form_state->setRedirectUrl($this->entity
        ->toUrl('edit-form'));
    $this->messenger()
        ->addStatus($this->t('The lock has been broken and you may now edit this view.'));
}

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