module_load_include

Versions
6 – 7
module_load_include($type, $module, $name = NULL)

Load a module include file.

Examples:

<?php

// Load node.admin.inc from the node module.
  module_load_include('inc', 'node', 'node.admin');
// Load content_types.inc from the node module.
  module_load_include('inc', 'node', 'content_types');

?>

Do not use this function to load an install file. Use module_load_install() instead.

Parameters

$type The include file's type (file extension).

$module The module to which the include file belongs.

$name Optionally, specify the base file name (without the $type extension). If not set, $module is used.

▾ 35 functions call module_load_include()

comment_user_cancel in modules/comment/comment.module
Implement hook_user_cancel().
field_modules_uninstalled in modules/field/field.module
Implement hook_modules_uninstalled().
forum_overview in modules/forum/forum.admin.inc
Returns an overview list of existing forums and containers
hook_user_cancel in modules/user/user.api.php
Act on user account cancellations.
image_effect_apply in modules/image/image.module
Given an image object and effect, perform the effect on the file.
locale_field_attach_view_alter in modules/locale/locale.module
Implement hook_field_attach_view_alter().
locale_field_node_form_submit in modules/locale/locale.module
Form submit handler for node_form().
module_implements in includes/module.inc
Determine which modules are implementing a hook.
module_load_all_includes in includes/module.inc
Load an include file for each of the modules that have been enabled in the system table.
module_load_install in includes/module.inc
Load a module's installation hooks.
node_user_cancel in modules/node/node.module
Implement hook_user_cancel().
openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.
openid_association_request in modules/openid/openid.module
openid_authentication in modules/openid/openid.module
Authenticate a user or attempt registration.
openid_authentication_request in modules/openid/openid.module
openid_begin in modules/openid/openid.module
The initial step of OpenID authentication responsible for the following:
openid_complete in modules/openid/openid.module
Completes OpenID authentication by validating returned data from the OpenID Provider.
openid_discovery in modules/openid/openid.module
Perform discovery on a claimed ID to determine the OpenID provider endpoint.
openid_test_install in modules/openid/tests/openid_test.install
Implement hook_install().
openid_verify_assertion in modules/openid/openid.module
Attempt to verify the response received from the OpenID Provider.
update_create_fetch_task in modules/update/update.module
Wrapper to load the include file and then create a new fetch task.
update_fetch_data in modules/update/update.module
Wrapper to load the include file and then attempt to fetch update data.
update_get_available in modules/update/update.module
Internal helper to try to get the update information from the cache if possible, and to refresh the cache when necessary.
update_manager_confirm_update_form_submit in modules/update/update.manager.inc
Submit handler for the form to confirm that an update should continue.
update_manager_install_form_submit in modules/update/update.manager.inc
Handle form submission when installing new projects via the update manager.
update_manager_update_form in modules/update/update.manager.inc
Build the form for the update manager page to update existing projects.
update_refresh in modules/update/update.module
Wrapper to load the include file and then refresh the release data.
update_requirements in modules/update/update.module
Implement hook_requirements().
update_status in modules/update/update.report.inc
Menu callback. Generate a page about the update status of projects.
update_update_7000 in modules/update/update.install
Create a queue to store tasks for requests to fetch available update data.
user_admin_settings in modules/user/user.admin.inc
Form builder; Configure user settings for this site.
user_multiple_cancel_confirm in modules/user/user.module
_openid_test_endpoint_associate in modules/openid/tests/openid_test.module
OpenID endpoint; handle "associate" requests (see OpenID Authentication 2.0, section 8).
_openid_test_endpoint_authenticate in modules/openid/tests/openid_test.module
OpenID endpoint; handle "authenticate" requests.
_update_refresh in modules/update/update.fetch.inc
Clear out all the cached available update data and initiate re-fetching.

Code

includes/module.inc, line 258

<?php
function module_load_include($type, $module, $name = NULL) {
  if (empty($name)) {
    $name = $module;
  }

  if (function_exists('drupal_get_path')) {
    $file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type";
    if (is_file($file)) {
      require_once $file;
      return $file;
    }
  }
  return FALSE;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.