Skip to content

Cross references

Version v1

Insert nodeUpdate nodeLoad original entityLoad referenced nodeSet Cross RefvoidMsgMsgLoad referenced nodevoidEmpty Cross RefMsgIs Type 1?Is Type 2?Value changed?Not empty?Is empty?Not empty?

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_test_0001

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

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

# Rebuilding caches is optional, sometimes required:
drush cr

Purpose

Two different node types are referring each other. If one node gets saved with a reference to another node, the other node gets automatically updated to link back to the first node.

Dependencies

  • config
    • field.field.node.type_1.field_other_node
    • field.field.node.type_2.field_other_node
    • field.storage.node.field_other_node
    • node.type.type_1
    • node.type.type_2
  • module
    • eca_base
    • eca_content
    • node

Used plugins

Events

Conditions

Actions

Changelog

v1

Initial version