function ctools_plugin_load_class in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 includes/plugins.inc \ctools_plugin_load_class()
Load a plugin and get a class name from it, returning success only if the class exists.
Parameters
$module: The module that owns the plugin type.
$type: The type of plugin.
$id: The id of the specific plugin to load.
$class_name: The identifier of the class. For example, 'handler'.
$abstract: If true, will tell ctools_plugin_get_class to allow the return of abstract classes.
Return value
The actual name of the class to call, or NULL if the class does not exist.
1 call to ctools_plugin_load_class()
- ctools_plugin_get_class in includes/
plugins.inc - Get a class from a plugin, if it exists. If the plugin is not already loaded, try ctools_plugin_load_class() instead.
File
- includes/
plugins.inc, line 807 - 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_load_class($module, $type, $id, $class_name, $abstract = FALSE) {
$plugin = ctools_get_plugins($module, $type, $id);
return ctools_plugin_get_class($plugin, $class_name, $abstract);
}