1.20.x 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

modules/views/views.module, line 962
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'])) {
      $path = './' . $api_info['path'] . '/' . $api_info['module'] . '.' . $api . '.inc';
      if (is_file($path)) {
        $included_modules[$module] = $api_info;
        include_once ($path);
      }
    }
  }
  return $included_modules;
}