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:


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

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


$file: The base file name to be included.

$module: Optional module containing the include.

$dir: Optional subdirectory containing the include file.

317 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/
Instantiate, populate and return a box object.
boxes_box::load in sites/all/modules/ulmus/boxes/plugins/
Load existing box by its unique identifier $delta.
boxes_box::reset in sites/all/modules/ulmus/boxes/plugins/
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.


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


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$";
    $used[$module][$dir][$file] = TRUE;