1 views.module | views_module_include($api, $reset = FALSE) |
Load views files on behalf of modules.
@todo: Remove in favor of locating includes directly within core modules.
File
- core/
modules/ views/ views.module, line 996 - Primarily Backdrop hooks and global API functions to manipulate views.
Code
function views_module_include($api, $reset = FALSE) {
$api_cache = views_get_module_apis($reset);
$included_modules = array();
foreach ($api_cache as $module => $api_info) {
if (isset($api_info['path'])) {
// Custom location for MODULE.views.inc file.
$include_path = $api_info['path'];
}
else {
$include_path = backdrop_get_path('module', $module);
}
$path = './' . $include_path . '/' . $api_info['module'] . '.' . $api . '.inc';
if (is_file($path)) {
$included_modules[$module] = $api_info;
include_once ($path);
}
}
return $included_modules;
}