function AddEventForm::buildForm
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 FormInterface::buildForm
File
-
src/
Form/ AddEventForm.php, line 76
Class
- AddEventForm
- UI form to add an event to a rule.
Namespace
Drupal\rules\FormCode
public function buildForm(array $form, FormStateInterface $form_state, ReactionRuleConfig $rules_reaction_rule = NULL) {
$this->reactionRule = $rules_reaction_rule;
$form = $this->buildEventForm($form, $form_state);
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Add'),
'#button_type' => 'primary',
];
return $form;
}