You are here

function ctools_context_get_all_converters in Chaos Tool Suite (ctools) 7

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

Get a list of all contexts converters available.

For all contexts returned by ctools_get_contexts(), return the converter for all contexts that have one.

Return value

array A list of context converters, keyed by the title of the converter.

2 calls to ctools_context_get_all_converters()
views_content_plugin_display_ctools_context::options_form in views_content/plugins/views/views_content_plugin_display_ctools_context.inc
Provide the default form for setting options.
views_content_plugin_display_panel_pane::options_form in views_content/plugins/views/views_content_plugin_display_panel_pane.inc
Provide the default form for setting options.

File

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

Code

function ctools_context_get_all_converters() {
  $contexts = ctools_get_contexts();
  $converters = array();
  foreach ($contexts as $name => $context) {
    if (empty($context['no required context ui'])) {
      $context_converters = _ctools_context_get_converters($name . '.', $name);
      if ($context_converters) {
        $converters[$context['title']] = $context_converters;
      }
    }
  }
  return $converters;
}