4. Rules data types

Last modified: February 4, 2009 - 17:30

Arguments are always of a given data type. Rules comes with support of these data types:

Type Label Type Name Identifiable Uses input form Savable Hidden
Content node Yes No Yes No
User user Yes No No No
Comment comment Yes No No No
Type Label Type Name Identifiable Uses input form Savable Hidden
String string No Yes No No
Number number No Yes No No
Date date No Yes No No
Truth Value boolean No Yes No No
Value value No Yes No Yes

Identifiable means, that a variable of such type can be identified and restored when the identifier is given. This is done when packing and unpacking variables for schedule rule set execution. Savable data types can be saved automatically - so rules can save them only when necessary (aka "intelligent saving"). Hidden data types are hidden from the UI.

When an action or condition is configured, arguments with a data type not using an input form are configured by mapping an available suiting variable to the argument - so at execution time the variable is passed to the action's implementation.
For arguments of an data type using an input form the form is provided on configuration time, suitable for entering a value - often combined with input evaluation. When the action or condition is evaluated it creates an instance of the data type on the fly and passes it to the action/condition.

The value data type doesn't provide any configuration form, as it may be used only for fixed value arguments together with the 'default value' property.

Modules may provide further data types.

 
 

Drupal is a registered trademark of Dries Buytaert.