function views_skinr_access_handler_view in Skinr 6.2
Same name and namespace in other branches
- 6 modules/views.skinr.inc \views_skinr_access_handler_view()
Related topics
1 string reference to 'views_skinr_access_handler_view'
- views_skinr_config in modules/
views.skinr.inc - Implementation of hook_skinr_config().
File
- modules/
views.skinr.inc, line 112 - Provide skinr handling for node.module
Code
function views_skinr_access_handler_view($op, &$form, $form_state) {
// We don't want the skinr settings form to appear on this form. We only want
// to intercept it so we can save our cached data.
// Since we're not using the form, we won't get our form submitter, so let's
// add it manually.
// Only add submit handler once
if (!in_array('skinr_ui_form_submit', $form['#submit'])) {
$form['#submit'][] = 'skinr_ui_form_submit';
}
// Special for views
if (isset($form['buttons']['save']['#submit']) && !in_array('skinr_ui_form_submit', $form['buttons']['save']['#submit'])) {
$form['buttons']['save']['#submit'][] = 'skinr_ui_form_submit';
}
if (isset($form['buttons']['cancel']['#submit']) && !in_array('skinr_ui_form_submit', $form['buttons']['cancel']['#submit'])) {
// Need to make this happen before views' submit handler because it hijacks
// things and does a drupal_goto(). That effectively prevents any other
// submit handlers from being processed.
array_unshift($form['buttons']['cancel']['#submit'], 'skinr_ui_form_submit');
}
return FALSE;
}