function 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'.
Return value
string The actual name of the class to call, or NULL if the class does not exist.
2 calls to ctools_plugin_load_class()
- CtoolsPluginsGetInfoTestCase::assertPluginClass in tests/
ctools.plugins.test - Assert helper to check that a plugin can be loaded using a named class.
- CtoolsPluginsGetInfoTestCase::assertPluginMissingClass in tests/
ctools.plugins.test - Assert helper to check that a plugin DOES NOT contain the named class.
File
-
includes/
plugins.inc, line 904
Code
function ctools_plugin_load_class($module, $type, $id, $class_name) {
$plugin = ctools_get_plugins($module, $type, $id);
return ctools_plugin_get_class($plugin, $class_name);
}