You are here

public function RuleExpressionForm::form in Rules 8.3

Adds elements specific to the expression to the form.

Parameters

array $form: The form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current form state.

Overrides ExpressionFormInterface::form

File

src/Form/Expression/RuleExpressionForm.php, line 33

Class

RuleExpressionForm
Form view structure for rule expressions.

Namespace

Drupal\rules\Form\Expression

Code

public function form(array $form, FormStateInterface $form_state) {
  $conditions_form_handler = $this->rule
    ->getConditions()
    ->getFormHandler();
  $form = $conditions_form_handler
    ->form($form, $form_state);
  $actions_form_handler = $this->rule
    ->getActions()
    ->getFormHandler();
  $form = $actions_form_handler
    ->form($form, $form_state);
  return $form;
}