function rules_rules_file_info

Implements hook_rules_file_info().

File

./rules.rules.inc, line 58

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;
}