You are here

function rules_use_element in Rules 6

Configures an element of type $type with the further properties $params

3 calls to rules_use_element()
rules_configure in rules/rules.module
A simple helping function, which eases the creation of rules Example use case: $conditions = rules_configure('OR', $condition1, conditions2);
rules_use_action in rules/rules.module
Configures an action for using in a rule
rules_use_condition in rules/rules.module
Configures a condition for using in a rule

File

rules/rules.module, line 675
Rules engine module

Code

function rules_use_element($type, $params = array()) {
  $element = array(
    '#type' => $type,
  );

  //add in the element info to speed up execution
  $element += $params;
  rules_init_element_info($element);
  return $element;
}