Module Development

Declaring Conditions for Rules for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Sprout Video

This screencast shows how to create a condition plugin for Rules:

  • How to declare new conditions for Rules
  • How to provide the condition callbacks with parameters to act on
  • The big similarities and the few differences between actions and conditions

In the example, a condition is built to check which view type a provided view has.