public function BreakLockForm::buildForm in Rules 8.3
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 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);
}