You are here

function ctools_context_convert_context in Chaos Tool Suite (ctools) 6

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

Let the context convert an argument based upon the converter that was given.

3 calls to ctools_context_convert_context()
ctools_context_keyword_substitute in includes/context.inc
Perform keyword and context substitutions.
views_content_views_content_type_render in views_content/plugins/content_types/views.inc
Output function for the 'views' content type.
views_content_views_panes_content_type_render in views_content/plugins/content_types/views_panes.inc
Output function for the 'views' content type.

File

includes/context.inc, line 498
Contains code related to the ctools system of 'context'.

Code

function ctools_context_convert_context($context, $converter) {
  $value = $context->argument;
  if ($function = ctools_plugin_load_function('ctools', 'contexts', $context->plugin, 'convert')) {
    $value = $function($context, $converter);
  }
  foreach (module_implements('ctools_context_converter_alter') as $module) {
    $function = $module . '_ctools_context_converter_alter';
    $function($context, $converter, $value);
  }
  return $value;
}