You are here

function patterns_load_components in Patterns 6.2

Same name and namespace in other branches
  1. 6 patterns.module \patterns_load_components()
6 calls to patterns_load_components()
patterns_batch_actions in ./patterns.module
Execute a batch action
patterns_batch_actions_drush in ./patterns.drush.inc
Execute a batch action
patterns_enable_pattern_submit in ./patterns.module
patterns_get_patterns in ./patterns.module
patterns_list in ./patterns.module

... See full list

File

./patterns.module, line 910
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_load_components() {
  static $loaded = false;
  if ($loaded) {
    return;
  }
  require_once drupal_get_path('module', 'patterns') . '/patterns.inc';

  // Get a list of directories to search
  $paths = module_invoke_all('patterns_directory');
  foreach ($paths as $path) {
    foreach (file_scan_directory($path . '/components', '.\\.inc$') as $file) {
      include_once $file->filename;
    }
  }
  $loaded = true;
}