Rules is a great module for creating event driven actions through the UI and is used throughout the Drupal Commerce modules.

Rules created through the UI can be exported using Features and re-used on multiple sites, but if you want to include a rule with you module that can be dynamically altered depending on the sites configuration this doesn't work.

In this session I will give a brief introduction to rule and explain how to use hook_default_rules_configuration() and hook_default_rules_configuration_alter() to include rules with your module without the need for Features.

I will use the examples from the Commerce European Union VAT module to demonstrate negating conditions, condition sets, and nesting rules.

Further reading
The Little Book of Rules

D.O Documentation

Learning Rules Framework Videos

DrupalCamp North West [] is an event of The North West Drupal User Group []

This film was made possible thanks to a Drupal Association Community Cultivation Grant and the generous support of our sponsors

Loading more stuff…

Hmm…it looks like things are taking a while to load. Try again?

Loading videos…