BreakLockForm::buildForm

public BreakLockForm::buildForm(array $form, FormStateInterface $form_state)

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 EntityConfirmFormBase::buildForm

File

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

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.', array('%name' => $this->entity->id()));
    return $form;
  }
  return parent::buildForm($form, $form_state);
}
doc_Drupal
2016-10-29 08:48:47
Comments
Leave a Comment

Please login to continue.