You are here

function rules_after_build_include_files in Rules 6

An form after build callback that can be used to include arbitrary files needed by the form.

1 string reference to 'rules_after_build_include_files'
rules_admin_form_pack_storage in rules_admin/rules_admin.rule_forms.inc
Use this function when there should be a further step. It puts all variables needed into the form storage

File

rules/rules.module, line 1003
Rules engine module

Code

function rules_after_build_include_files($form, $form_state) {
  static $files = array();
  if (isset($form['#includes'])) {
    foreach ($form['#includes'] as $file) {
      if (!isset($files[$file])) {
        include_once $file;
        $files[$file] = TRUE;
      }
    }
  }
  return $form;
}