You are here

function asset_load_modules in Asset 5.2

Load all our module 'on behalfs'.

Related topics

1 call to asset_load_modules()
asset.module in ./asset.module
Main module.

File

./asset.module, line 136
Main module.

Code

function asset_load_modules() {
  $path = drupal_get_path('module', 'asset') . '/modules';
  $files = drupal_system_listing('asset_.*\\.inc$', $path, 'name', 0);
  foreach ($files as $file) {

    // The filename format is very specific. It must be asset_MODULENAME.inc
    $module = substr_replace($file->name, '', 0, 6);
    if (module_exists($module)) {
      require_once "./{$file->filename}";
    }
  }
}