| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/business/sites/all/modules/ctools/plugins/cache/ |
Upload File : |
<?php
/**
* @file
* A caching mechanism for use with subsystems that use the export ui.
*/
$plugin = array(
// Cache plugins are the rare plugin types that have no real UI but
// we're providing a title just in case.
'title' => t('Export UI wizard cache'),
'cache get' => 'ctools_cache_export_ui_cache_get',
'cache set' => 'ctools_cache_export_ui_cache_set',
// Some operations use a 'finalize' but that really just means set
// for us, since we're not using temporary storage for subsystems.
'cache finalize' => 'ctools_cache_export_ui_cache_set',
);
function ctools_cache_export_ui_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;
}
}
function ctools_cache_export_ui_cache_set($plugin_name, $key, $item) {
ctools_include('export-ui');
$plugin = ctools_get_export_ui($plugin_name);
$handler = ctools_export_ui_get_handler($plugin);
if ($handler) {
return $handler->edit_cache_set_key($item, $key);
}
}