Change record status: 
Introduced in branch: 
2.0.x
Introduced in version: 
2.0.0
Description: 

Building configuration forms in plugins for ECA (all types included, i.e. events, conditions, actions) should follow the structure to first define the fields of the current plugin, followed by calling the form builder of the parent, and finally making optional modifications to the form.

Example:

  public function buildConfigurationForm(array $form, FormStateInterface $form_state): array {
    $form['user_id'] = [
      '#type' => 'textfield',
      '#title' => $this->t('User ID'),
      '#description' => $this->t('The user ID, which gets compared.'),
      '#default_value' => $this->configuration['user_id'],
      '#weight' => -10,
      '#eca_token_replacement' => TRUE,
    ];
    $form = parent::buildConfigurationForm($form, $form_state);
    $form['some_parent_field']['#access'] = FALSE;
    return $form;
  }

This is necessary so that the parent form builder can add the common alterations to the config forms, like the token support description text and the likes.

Impacts: 
Module developers
Site templates, recipes and distribution developers