Last updated July 16, 2012. Created on August 10, 2010.
Edited by hejazee, alexweber, mitchell, jordojuice. 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.