You are here

function views_skinr_submit_handler_view in Skinr 6

Same name and namespace in other branches
  1. 6.2 modules/views.skinr.inc \views_skinr_submit_handler_view()

Related topics

1 string reference to 'views_skinr_submit_handler_view'
views_skinr_data in modules/views.skinr.inc
Implementation of hook_skinr_data().

File

modules/views.skinr.inc, line 252
Provide skinr handling for node.module

Code

function views_skinr_submit_handler_view(&$form, $form_state, $module, $form_settings) {
  switch ($form_state['values']['op']) {
    case t('Save'):

      // Fetch skinr data for this view from cache
      views_include('cache');
      if ($skinr_data = views_object_cache_get('skinr', $form_state['view']->name, TRUE)) {
        $hook = $module;
        foreach ($skinr_data as $theme_name => $theme) {
          foreach ($theme as $key => $value) {
            skinr_set($theme_name, $hook, $key, $value);
          }
        }
        views_object_cache_clear('skinr', $form_state['view']->name);
      }
      break;
    case t('Cancel'):

      // Remove our data from views cache
      views_include('cache');
      views_object_cache_clear('skinr', $form_state['view']->name);
      break;
  }
}