function rules_elements in Rules 6
Implementation of hook_elements() Defines default values for all available properties of rules's element types
Note that the #process handlers are only used by the form API, but not by the rules engine.
File
- rules/
rules.module, line 526 - Rules engine module
Code
function rules_elements() {
$types = array();
$types['rule'] = array(
'#name' => '',
'#set' => '',
'#status' => 'default',
'#categories' => array(),
'#recursion' => FALSE,
'#active' => TRUE,
'#execute' => 'rules_execute_rule',
'#conditions' => array(),
'#actions' => array(),
);
$types['condition'] = array(
'#name' => '',
'#info' => array(),
'#negate' => FALSE,
'#settings' => array(
'#argument map' => array(),
),
'#execute' => 'rules_execute_condition',
'#suffix' => '<br clear="all" />',
);
$types['action'] = array(
'#name' => '',
'#info' => array(),
'#settings' => array(
'#argument map' => array(),
),
'#execute' => 'rules_execute_action',
'#suffix' => '<br clear="all" />',
);
$types['OR'] = array(
'#execute' => 'rules_execute_or',
'#logical_op' => TRUE,
'#negate' => FALSE,
'#theme' => 'rules_operation',
'#label' => t('OR'),
);
$types['AND'] = array(
'#execute' => 'rules_execute_and',
'#logical_op' => TRUE,
'#negate' => FALSE,
'#theme' => 'rules_operation',
'#label' => t('AND'),
);
return $types;
}