You are here

function ctools_plugin_load_function in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/plugins.inc \ctools_plugin_load_function()

Load a plugin and get a function name from it, returning success only if the function exists.

Parameters

$module: The module that owns the plugin type.

$type: The type of plugin.

$id: The id of the specific plugin to load.

$function_name: The identifier of the function. For example, 'settings form'.

Return value

The actual name of the function to call, or NULL if the function does not exist.

9 calls to ctools_plugin_load_function()
ctools_context_convert_context in includes/context.inc
Let the context convert an argument based upon the converter that was given.
ctools_context_create in includes/context.inc
Create a new context object.
ctools_context_create_empty in includes/context.inc
Create an empty context object.
ctools_context_get_context_from_argument in includes/context.inc
Get a context from an argument.
ctools_context_get_context_from_relationship in includes/context.inc

... See full list

File

includes/plugins.inc, line 720
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_function($module, $type, $id, $function_name) {
  $plugin = ctools_get_plugins($module, $type, $id);
  return ctools_plugin_get_function($plugin, $function_name);
}