You are here

function patterns_load_components in Patterns 6

Same name and namespace in other branches
  1. 6.2 patterns.module \patterns_load_components()
5 calls to patterns_load_components()
patterns_batch_actions in ./patterns.module
Execute a batch action
patterns_enable_pattern_submit in ./patterns.module
patterns_get_patterns in ./patterns.module
patterns_list in ./patterns.module
patterns_prepare_actions in ./patterns.module

File

./patterns.module, line 904
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;
}