You are here

function _rules_element_defaults in Rules 6

Makes sure the element defaults are applied

8 calls to _rules_element_defaults()
rules_admin_form_add in rules_admin/rules_admin.rule_forms.inc
Returns the form for the add operation This handles adding conditions and actions
rules_admin_form_clone in rules_admin/rules_admin.rule_forms.inc
Clones a rule
rules_admin_form_delete in rules_admin/rules_admin.rule_forms.inc
Shows the delete form for elements (conditions, actions, ..)
rules_admin_form_edit_rule in rules_admin/rules_admin.rule_forms.inc
Returns the form for editing a rule
rules_admin_overview_table in rules_admin/rules_admin.inc
Returns a table of rules filtered by the given parameters

... See full list

File

rules/rules.module, line 374
Rules engine module

Code

function _rules_element_defaults(&$element) {
  if (!isset($element['#_defaults_applied'])) {
    if (!empty($element['#type']) && ($info = _element_info($element['#type']))) {

      // Overlay $info onto $element, retaining preexisting keys in $element.
      $element += $info;
    }
    $element['#_defaults_applied'] = TRUE;
  }
}