function panels_plugin_get_function in Panels 5.2
Same name and namespace in other branches
- 6.3 includes/plugins.inc \panels_plugin_get_function()
- 6.2 includes/plugins.inc \panels_plugin_get_function()
- 7.3 includes/plugins.inc \panels_plugin_get_function()
Get a function from a plugin, if it exists.
Parameters
$plugin: The type of plugin
$which: Either the loaded plugin object (or the same data in array form) or a string with the name of the desired the specific plugin.
$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.
21 calls to panels_plugin_get_function()
- panels_ajax_cache_settings in includes/
display_edit.inc - Handle the cache settings form
- panels_argument_choose_display in includes/
plugins.inc - Pick which display an argument wants to use
- panels_argument_get_context in includes/
plugins.inc - Get a context from an argument
- panels_clear_cached_content in includes/
plugins.inc - Clear all cached content for a display.
- panels_content_config_form_submit in includes/
display_edit.inc - FAPI submit handler for panels_content_config_form().
File
- includes/
plugins.inc, line 1293 - plugins.inc
Code
function panels_plugin_get_function($plugin, $which, $function_name) {
if (is_object($which) || is_array($which)) {
$plugin_data = $which;
}
else {
$hook = "panels_{$plugin}";
$plugin_data = panels_get_plugins($plugin, $hook, $which);
}
if (isset($plugin_data[$function_name]) && function_exists($plugin_data[$function_name])) {
return $plugin_data[$function_name];
}
}