Conditions / Actions

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

sadfaf

Conditions / actions

Should I provide a new condition/action?

A more complex example

When providing an action, you need to declare all parameters needed in hook_rules_action_info(). Consider the action to add or remove user

Defining categories, optionally with icons

Since Rules 2.4 the API allows you to define categories instead (or in addition) to the regular 'group' key of actions/conditions. As of now

Making actions translatable

In order to make an action or condition translatable via the provided Rules translation module you may denote textual parameters to be

Providing actions/conditions via classes

Since Rules 2.4 it's possible to implement actions or conditions via classes - in alternative to the existing functional/info hook based way

Providing new variables

Actions may provide new variables to Rules, which in turn other actions may pick up. For that describe the variables that the action

Guide maintainers

TR's picture