You are here

function rules_include in Rules 6

Includes rules specific include files

Parameters

$type: One of 'rules', 'rules_forms', 'rules_defaults' or 'rules_admin'.

17 calls to rules_include()
rules_admin_element_alter_form in rules_admin/rules_admin.rule_forms.inc
Allows the element to alter the default configuration form
rules_admin_element_alter_form_submit in rules_admin/rules_admin.rule_forms.inc
rules_admin_element_alter_form_validate in rules_admin/rules_admin.rule_forms.inc
rules_admin_element_help in rules_admin/rules_admin.inc
Shows the element help
rules_admin_import_workflow_ng in rules_admin/rules_admin.export.inc
Tries to import workflow-ng rules.

... See full list

File

rules/rules.module, line 947
Rules engine module

Code

function rules_include($type = 'rules') {
  static $included;
  if (!isset($included)) {
    $included = array();
  }
  if (!isset($included[$type])) {
    $included[$type] = TRUE;
    if ($type == 'rules_admin') {
      $files = array(
        drupal_get_path('module', 'rules_admin') . '/rules_admin.inc',
      );
    }
    elseif ($cache = cache_get('include_' . $type, 'cache_rules')) {
      $files = $cache->data;
    }
    else {
      $files = _rules_include_get_files($type);
      cache_set('include_' . $type, $files, 'cache_rules');
    }
    foreach ($files as $file) {
      include_once $file;
    }
    rules_log(t('Included @module.rules.inc files.', array(
      '@module.rules.inc' => 'MODULE.' . $type . '.inc',
    )));
  }
}