You are here

public function ctools_export_ui::edit_cache_get in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/export_ui/ctools_export_ui.class.php \ctools_export_ui::edit_cache_get()

Retrieve the item currently being edited from the object cache.

4 calls to ctools_export_ui::edit_cache_get()
ctools_export_ui::add_page in plugins/export_ui/ctools_export_ui.class.php
ctools_export_ui::clone_page in plugins/export_ui/ctools_export_ui.class.php
Main entry point to clone an item.
ctools_export_ui::edit_page in plugins/export_ui/ctools_export_ui.class.php
Main entry point to edit an item.
ctools_export_ui::import_page in plugins/export_ui/ctools_export_ui.class.php
Page callback to import information for an exportable item.

File

plugins/export_ui/ctools_export_ui.class.php, line 972

Class

ctools_export_ui
Base class for export UI.

Code

public function edit_cache_get($item, $op = 'edit') {
  ctools_include('object-cache');
  if (is_string($item)) {
    $name = $item;
  }
  else {
    $name = $this
      ->edit_cache_get_key($item, $op);
  }
  $cache = ctools_object_cache_get('ctui_' . $this->plugin['name'], $name);
  if ($cache) {
    $cache->export_ui_item_is_cached = TRUE;
    return $cache;
  }
}