function BreakLockForm::submitForm

Same name and namespace in other branches
  1. 11.x core/modules/views_ui/src/Form/BreakLockForm.php \Drupal\views_ui\Form\BreakLockForm::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.