function views_skinr_data_handler in Skinr 6
Same name and namespace in other branches
- 6.2 modules/views.skinr.inc \views_skinr_data_handler()
Skinr data handler. This is the data that populates the skinr form.
Parameters
&$form: Passes in the $form parameter from hook_form_submit().
$form_state: Passes in the $form_state parameter from hook_form_submit().
$module: The module that is currently being processed.
$form_settings: The settings from hook_skinr_data() for the form that's currently being processed.
Return value
TRUE if we get access, FALSE if we don't.
Related topics
1 string reference to 'views_skinr_data_handler'
- views_skinr_data in modules/
views.skinr.inc - Implementation of hook_skinr_data().
File
- modules/
views.skinr.inc, line 146 - Provide skinr handling for node.module
Code
function views_skinr_data_handler(&$form, $form_state, $theme, $module, $form_settings) {
// Ensure we have the required index_handler
if (empty($form_settings['index_handler'])) {
trigger_error(sprintf("No index_handler was found for form_id '%s' in module '%s'.", $form_id, $module), E_USER_ERROR);
}
$index = skinr_handler('form_index_handler', 'form', $form_settings['index_handler'], $form, $form_state);
// Fetch skinr data for this view from cache
views_include('cache');
if ($skinr_data = views_object_cache_get('skinr', $form_state['view']->name)) {
if (isset($skinr_data[$theme][$index])) {
return $skinr_data[$theme][$index];
}
else {
return array();
}
}
// No data exists in cache, so let's grab it from the regular source
return skinr_get($theme, $module, $index);
}