function BreakLockForm::buildForm
Overrides ConfirmFormBase::buildForm
File
-
src/
Form/ BreakLockForm.php, line 102
Class
- BreakLockForm
- Builds the form to break the lock of an edited rule.
Namespace
Drupal\rules\FormCode
public function buildForm(array $form, FormStateInterface $form_state, RulesUiHandlerInterface $rules_ui_handler = NULL) {
$this->rulesUiHandler = $rules_ui_handler;
if (!$rules_ui_handler->isLocked()) {
$form['message']['#markup'] = $this->t('There is no lock on %label to break.', [
'%label' => $rules_ui_handler->getComponentLabel(),
]);
return $form;
}
return parent::buildForm($form, $form_state);
}