You are here

function ctools_export_ui_context_cache_get in Chaos Tool Suite (ctools) 6

Cache callback on behalf of ctools_export_ui.

File

./ctools.module, line 725
CTools primary module file.

Code

function ctools_export_ui_context_cache_get($plugin_name, $key) {
  ctools_include('export-ui');
  $plugin = ctools_get_export_ui($plugin_name);
  $handler = ctools_export_ui_get_handler($plugin);
  if ($handler) {
    $item = $handler
      ->edit_cache_get($key);
    if (!$item) {
      $item = ctools_export_crud_load($handler->plugin['schema'], $key);
    }
    return $item;
  }
}