function panels_skinr_form_index_handler in Skinr 6
Same name and namespace in other branches
- 6.2 modules/panels.skinr.inc \panels_skinr_form_index_handler()
Skinr form index handler.
Parameters
$op: What kind of action is being performed. Possible values:
- "form": the form elements for Skinr are being inserted in a form
- "submit": the form has been submitted.
&$form:
- For "form", passes in the $form parameter from hook_form_alter().
- For "submit", passes in the $form parameter from hook_form_submit().
$form_state:
- For "form", passes in the $form_state parameter from hook_form_alter().
- For "submit", passes in the $form_state parameter from hook_form_submit().
Return value
The index where we can find our values in Skinrs data structure.
Related topics
1 string reference to 'panels_skinr_form_index_handler'
- panels_skinr_data in modules/
panels.skinr.inc - Implementation of hook_skinr_data().
File
- modules/
panels.skinr.inc, line 64 - Provide skinr handling for panels.module.
Code
function panels_skinr_form_index_handler($op, &$form, $form_state) {
switch ($op) {
case 'form':
case 'submit':
switch ($form['#parameters'][1]['type']) {
case 'display':
return 'display-' . $form['#parameters'][1]['display']->did;
case 'region':
return 'display-' . $form['#parameters'][1]['display']->did . '-region-' . $form['#parameters'][1]['pid'];
case 'pane':
return 'display-' . $form['#parameters'][1]['display']->did . '-pane-' . $form['#parameters'][1]['pid'];
}
}
}