function ctools_plugin_get_plugin_type_info

cis7 plugins.inc ctools_plugin_get_plugin_type_info($flush = FALSE)
cle7 plugins.inc ctools_plugin_get_plugin_type_info($flush = FALSE)
elmsmedia7 plugins.inc ctools_plugin_get_plugin_type_info($flush = FALSE)
icor7 plugins.inc ctools_plugin_get_plugin_type_info($flush = FALSE)
meedjum_blog7 plugins.inc ctools_plugin_get_plugin_type_info($flush = FALSE)
mooc7 plugins.inc ctools_plugin_get_plugin_type_info($flush = FALSE)

Return the full list of plugin type info for all plugin types registered in the current system.

This function manages its own cache getting/setting, and should always be used as the way to initially populate the list of plugin types. Make sure you call this function to properly populate the ctools_plugin_type_info static variable.

Return value

array A multilevel array of plugin type info, the outer array keyed on module name and each inner array keyed on plugin type name.

3 calls to ctools_plugin_get_plugin_type_info()
ctools_get_plugins in sites/all/modules/ulmus/ctools/includes/plugins.inc
Fetch a group of plugins by name.
ctools_plugin_get_info in sites/all/modules/ulmus/ctools/includes/plugins.inc
Ask a module for info about a particular plugin type.
_ctools_registry_files_alter in sites/all/modules/ulmus/ctools/includes/registry.inc
Implements (via delegation) hook_registry_files_alter().

File

sites/all/modules/ulmus/ctools/includes/plugins.inc, line 345
Contains routines to organize and load plugins. It allows a special variation of the hook system so that plugins can be kept in separate .inc files, and can be either loaded all at once or loaded only when necessary.

Code

function ctools_plugin_get_plugin_type_info($flush = FALSE) {
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast['info_loaded'] = &drupal_static('ctools_plugin_type_info_loaded', FALSE);
    $drupal_static_fast['all_type_info'] = &drupal_static('ctools_plugin_type_info', array());
  }
  $info_loaded = &$drupal_static_fast['info_loaded'];
  $all_type_info = &$drupal_static_fast['all_type_info'];

  // Only trigger info loading once.
  if ($info_loaded && !$flush) {
    return $all_type_info;
  }
  $info_loaded = TRUE;

  $cache = cache_get('ctools_plugin_type_info');
  if (!empty($cache->data) && !$flush) {
    // Plugin type info cache is warm, use it.
    $all_type_info = $cache->data;
  }
  else {
    // Cache expired, refill it.
    foreach (module_implements('ctools_plugin_type') as $module) {
      $module_infos = array();
      $function = $module . '_ctools_plugin_type';
      $module_infos = $function();

      foreach ($module_infos as $plugin_type_name => $plugin_type_info) {
        // Apply defaults. Array addition will not overwrite pre-existing keys.
        $plugin_type_info += array(
          'module' => $module,
          'type' => $plugin_type_name,
          'cache' => FALSE,
          'cache table' => 'cache',
          'classes' => array(),
          'use hooks' => FALSE,
          'defaults' => array(),
          'process' => '',
          'alterable' => TRUE,
          'extension' => 'inc',
          'info file' => FALSE,
          'hook' => $module . '_' . $plugin_type_name,
          'load themes' => FALSE,
        );
        $all_type_info[$module][$plugin_type_name] = $plugin_type_info;
      }
    }
    cache_set('ctools_plugin_type_info', $all_type_info);
  }

  return $all_type_info;
}
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.