You are here

function _panels_skinr_save_and_clear_cache in Skinr 6.2

Same name and namespace in other branches
  1. 6 modules/panels.skinr.inc \_panels_skinr_save_and_clear_cache()

Related topics

1 call to _panels_skinr_save_and_clear_cache()
panels_skinr_submit_handler_display in modules/panels.skinr.inc
@todo remove values from skinr if a display is deleted

File

modules/panels.skinr.inc, line 333
Provide skinr handling for panels.module.

Code

function _panels_skinr_save_and_clear_cache($did) {
  if ($skinr_data = ctools_object_cache_get('skinr', $did, TRUE)) {
    foreach ($skinr_data as $theme_name => $theme) {
      foreach ($theme as $sid => $skins) {
        $skinr = new stdClass();
        $skinr->theme = $theme_name;
        $skinr->module = 'panels';
        $skinr->sid = $sid;
        $skinr->skins = $skins;
        skinr_set($skinr);
      }
    }
    ctools_object_cache_clear('skinr', $did);
  }
}