You are here

protected static function RulesAbstractPlugin::getIncludeFiles in Rules 7.2

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 1858
Rules base classes and interfaces needed for any rule evaluation.

Class

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

Code

protected static function getIncludeFiles($module, $all = TRUE) {
  $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;
}