function ctools_include

cis7 ctools.module ctools_include($file, $module = 'ctools', $dir = 'includes')
cle7 ctools.module ctools_include($file, $module = 'ctools', $dir = 'includes')
elmsmedia7 ctools.module ctools_include($file, $module = 'ctools', $dir = 'includes')
icor7 ctools.module ctools_include($file, $module = 'ctools', $dir = 'includes')
meedjum_blog7 ctools.module ctools_include($file, $module = 'ctools', $dir = 'includes')
mooc7 ctools.module ctools_include($file, $module = 'ctools', $dir = 'includes')

Include .inc files as necessary.

This fuction is helpful for including .inc files for your module. The general case is including ctools funcitonality like this:

ctools_include('plugins');

Similar funcitonality can be used for other modules by providing the $module and $dir arguments like this:

// include mymodule/includes/import.inc
ctools_include('import', 'mymodule');
// include mymodule/plugins/foobar.inc
ctools_include('foobar', 'mymodule', 'plugins');

Parameters

$file: The base file name to be included.

$module: Optional module containing the include.

$dir: Optional subdirectory containing the include file.

318 calls to ctools_include()
boxes_block_info in sites/all/modules/ulmus/boxes/boxes.module
Implements hook_block_info().
boxes_block_view in sites/all/modules/ulmus/boxes/boxes.module
Implements hook_block_view().
boxes_box::factory in sites/all/modules/ulmus/boxes/plugins/boxes_box.inc
Instantiate, populate and return a box object.
boxes_box::load in sites/all/modules/ulmus/boxes/plugins/boxes_box.inc
Load existing box by its unique identifier $delta.
boxes_box::reset in sites/all/modules/ulmus/boxes/plugins/boxes_box.inc
Reset the boxes cache.

... See full list

1 string reference to 'ctools_include'
feeds_importer_load_all in sites/all/modules/ulmus/feeds/feeds.module
Loads all importers.

File

sites/all/modules/ulmus/ctools/ctools.module, line 107
CTools primary module file.

Code

function ctools_include($file, $module = 'ctools', $dir = 'includes') {
  static $used = array();

  $dir = '/' . ($dir ? $dir . '/' : '');

  if (!isset($used[$module][$dir][$file])) {
    require_once DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "$dir$file.inc";
    $used[$module][$dir][$file] = TRUE;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.