public function BreakLockForm::buildForm

Implements \Drupal\Core\Form\FormInterface::buildForm().

Overrides ConfirmFormBase::buildForm

File

drupal/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php, line 107
Contains \Drupal\views_ui\Form\BreakLockForm.

Class

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

Namespace

Drupal\views_ui\Form

Code

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