function shortcut_patterns_params in Patterns 7
Same name and namespace in other branches
- 7.2 patterns_components/components/shortcut.inc \shortcut_patterns_params()
hook_patterns_params()
File
- patterns_components/
components/ shortcut.inc, line 234 - Patterns component for shortcut.
Code
function shortcut_patterns_params($action, $form_id, &$data = NULL, &$a) {
//provide the third parm.
switch ($form_id) {
case 'shortcut_set_edit_form':
case 'shortcut_set_delete_form':
case 'shortcut_link_add':
$result = array(
$data['shortcut_set_obj'],
);
break;
case 'shortcut_set_switch':
$result = array(
$data['account'],
);
break;
case 'shortcut_link_delete':
case 'shortcut_link_edit':
$result = array(
$data['shortcut_link_parm'],
);
break;
}
return patterns_results(PATTERNS_SUCCESS, t('Execution successful'), $result);
}