For Developers

All of the documentation in this guide is generic Rules documentation, and not specific to the Rules Essentials module. However, all the example code is taken directly from Rules Essentials so that you have working code and tests to inspect and so you have a concrete example of how this code may be integrated into and distributed with a real-world module.

Porting Rules code from Drupal 7

This guide is meant to help you convert your existing D7 Rules code into code that works with Rules in Drupal 8/9

Tools

Some useful tools for working with Rules

Events

Programming your own Events

Conditions

Programming your own Conditions

Actions

Programming your own Actions

Expressions

Programming your own Rules Expressions

Exposing custom data to Rules

How to make your custom data structures available for use in Rules

Providing global context variables

How to program your own global context provider

Defining new data filters

Data filters are plugins for the Typed Data module that are used to manipulate a token value for display

Embedded components

Embedding Rules components into your module

Migrating Rules

How to write migrations to move Reaction Rules from Drupal 7 to Drupal 8

Test cases

Providing test cases for your extensions to Rules is vital

Guide maintainers

TR's picture