You are here

function rules_rules_file_info in Rules 7.2

Implements hook_rules_file_info().

File

./rules.rules.inc, line 58
Includes any rules integration provided by the module.

Code

function rules_rules_file_info() {

  // Make use of the fast, advanced drupal static pattern.
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast =& drupal_static(__FUNCTION__);
  }
  $items =& $drupal_static_fast;
  if (!isset($items)) {
    $items = array();
    foreach (rules_core_modules() as $module) {
      if (function_exists($function = "rules_{$module}_file_info")) {
        $items = array_merge($items, (array) $function());

        // Automatically add "$module.rules.inc" for each module.
        $items[] = 'modules/' . $module . '.rules';
      }
    }
  }
  return $items;
}