Last updated 1 September 2016. Created on 10 August 2010.
Edited by designdoode, hejazee, alexweber, mitchell. Log in to edit this page.

Coding Rules Integrations

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/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 file in the module's root. Unfortunately it's not possible to specify a file in a module subdirectory such as "includes". See here for more information.

Looking for support? Visit the forums, or join #drupal-support in IRC.