Skip to content

Combined Conditions

Version v1

Instead of downloading the archive, you can download and apply this model as a recipe (Drupal 10.3 or later):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Import recipe
composer require drupal-eca-recipe/eca_lib_0002

# Enable recipe with Drush (requires version 13 or later):
drush recipe ../recipes/eca_lib_0002

# Enable recipe without Drush:
cd web && php core/scripts/drupal recipe ../recipes/eca_lib_0002

# Rebuilding caches is optional, sometimes required:
drush cr

Purpose

This means:

1
2
3
4
5
  - event 1: action "do something" is executed if condition 1 and condition 2 are both TRUE
  - event 2: do something is executed when condition 3 or condition 4 is TRUE
  - event 3: do something is executed when condition 5 or 6 AND condition 7 or 8 are TRUE

  With that pattern, you can achieve all possible combinations of AND and OR conditions

Dependencies

  • module
    • eca_base

Changelog

v1

Initial version