function _asset_include in Asset 6
Same name and namespace in other branches
- 5 asset.module \_asset_include()
1 call to _asset_include()
- asset.module in ./
asset.module
File
- inc/
asset.routines.inc, line 2
Code
function _asset_include() {
// load the views hooks if the views module is enabled
if (module_exists('views')) {
require_once drupal_get_path('module', 'asset') . '/inc/asset_views.inc';
}
// Load all our module 'on behalfs'.
$files = drupal_system_listing('asset_.*\\.inc$', drupal_get_path('module', 'asset') . '/inc/modules', '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;
}
}
}