You are here

function panels_plugin_get_function in Panels 7.3

Same name and namespace in other branches
  1. 5.2 includes/plugins.inc \panels_plugin_get_function()
  2. 6.3 includes/plugins.inc \panels_plugin_get_function()
  3. 6.2 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.

Deprecated

All calls to this function should be removed.

17 calls to panels_plugin_get_function()
panels_clear_cached_content in includes/plugins.inc
Clear all cached content for a display.
panels_display::access in ./panels.module
Determine if the given user can perform the requested operation.
panels_edit_cache_settings_form in plugins/display_renderers/panels_renderer_editor.class.php
Cache settings form.
panels_edit_cache_settings_form_submit in plugins/display_renderers/panels_renderer_editor.class.php
Allows panel styles to validate their style settings.
panels_edit_cache_settings_form_validate in plugins/display_renderers/panels_renderer_editor.class.php
Validate cache settings.

... See full list

File

includes/plugins.inc, line 523
Contains helper code for plugins and contexts.

Code

function panels_plugin_get_function($plugin, $which, $function_name) {
  ctools_include('plugins');
  if (is_object($which) || is_array($which)) {
    return ctools_plugin_get_function($which, $function_name);
  }
  else {
    return ctools_plugin_load_function('panels', $plugin, $which, $function_name);
  }
}