You are here

function system_patterns_export_all_modules in Patterns 7.2

Returns a set of PATTERNS_CREATE actions with the whole set of modules currently enabled in the system.

Parameters

string $args:

string $result:

Return value

array $actions

1 string reference to 'system_patterns_export_all_modules'
system_patterns in patterns_components/components/system.inc
Implements hook_patterns().

File

patterns_components/components/system.inc, line 73

Code

function system_patterns_export_all_modules($args = NULL, &$result = NULL) {
  $actions = array(
    PATTERNS_CREATE => array(
      'tag' => 'module',
    ),
  );
  foreach (module_list() as $module => $value) {
    $action = array(
      'value' => $module,
    );
    array_push($actions[PATTERNS_CREATE], $action);
  }
  $result = array(
    $actions,
  );
  return $result;
}