function RulesAbstractPlugin::getIncludeFiles

Returns all include files for a module.

Parameters

string $module: The module name.

bool $all: If FALSE, the $module.rules.inc file isn't added.

Return value

string[] An array containing the names of all the include files for a module.

2 calls to RulesAbstractPlugin::getIncludeFiles()
RulesAbstractPlugin::includeFiles in includes/rules.core.inc
Makes sure all supported destinations are included.
RulesAbstractPlugin::rebuildCache in includes/rules.core.inc
Add in the data provided by the info hooks to the cache.

File

includes/rules.core.inc, line 1869

Class

RulesAbstractPlugin
Defines a common base class for so-called "Abstract Plugins" like actions.

Code

protected static function getIncludeFiles($module, $all = TRUE) {
    // Ensure we don't trigger a file scan if $module is FALSE. This can happen
    // if _rules_discover_module() fails.
    if ($module) {
        $files = (array) module_invoke($module, 'rules_file_info');
    }
    // Automatically add "$module.rules_forms.inc" and "$module.rules.inc".
    $files[] = $module . '.rules_forms';
    if ($all) {
        $files[] = $module . '.rules';
    }
    return $files;
}