function ctools_context_convert_context

cis7 context.inc ctools_context_convert_context($context, $converter, $converter_options = array())
cle7 context.inc ctools_context_convert_context($context, $converter, $converter_options = array())
elmsmedia7 context.inc ctools_context_convert_context($context, $converter, $converter_options = array())
icor7 context.inc ctools_context_convert_context($context, $converter, $converter_options = array())
meedjum_blog7 context.inc ctools_context_convert_context($context, $converter, $converter_options = array())
mooc7 context.inc ctools_context_convert_context($context, $converter, $converter_options = array())

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

Parameters

$context: The context object

$converter: The converter to use, which should be a string provided by the converter list.

$converter_options: A n array of options to pass on to the generation function. For contexts that use token module, of particular use is 'sanitize' => FALSE which can get raw tokens. This should ONLY be used in values that will later be treated as unsafe user input since these values are by themselves unsafe. It is particularly useful to get raw values from Field API.

4 calls to ctools_context_convert_context()
ctools_context_keyword_substitute in sites/all/modules/ulmus/ctools/includes/context.inc
Perform keyword and context substitutions.
views_content_views_content_type_render in sites/all/modules/ulmus/ctools/views_content/plugins/content_types/views.inc
Output function for the 'views' content type.
views_content_views_panes_content_type_render in sites/all/modules/ulmus/ctools/views_content/plugins/content_types/views_panes.inc
Output function for the 'views' content type.
views_content_view_from_argument_context in sites/all/modules/ulmus/ctools/views_content/plugins/relationships/view_from_argument.inc
Return a new context based on an existing context.

File

sites/all/modules/ulmus/ctools/includes/context.inc, line 523
Contains code related to the ctools system of 'context'.

Code

function ctools_context_convert_context($context, $converter, $converter_options = array()) {
  // Contexts without plugins might be optional placeholders.
  if (empty($context->plugin)) {
    return;
  }

  $value = $context->argument;
  $plugin = ctools_get_context($context->plugin);
  if ($function = ctools_plugin_get_function($plugin, 'convert')) {
    $value = $function($context, $converter, $converter_options);
  }

  foreach (module_implements('ctools_context_converter_alter') as $module) {
    $function = $module . '_ctools_context_converter_alter';
    $function($context, $converter, $value, $converter_options);
  }

  return $value;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.