Coding Rules Integrations

Last updated on
27 January 2020

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

The Rules API provides hooks for developers to create extensions/integrations and further extend the API. The module comes with complete API docs for all provided hooks, available online at Rules Hooks) or by viewing the rules.api.php file.

The sections below describe how to code additional data types and plugins, as well as programmatically interact with rules configurations, execute rules, and define user-facing displays.

Many sections link to NodeOne's Learning Library for their video tutorials on Coding for Rules 2. 4 out of 5 Drupalers recommend it as the more entertaining choice ;-)

All rules hooks must be placed either in the main module or in a mymodule.rules.inc file in the module's root. Unfortunately it's not possible to specify a mymodule.rules.inc file in a module subdirectory such as "includes". See here for more information.

Help improve this page

Page status: No known problems

You can: