function _jammer_generic_remove_element in Jammer 7
Same name and namespace in other branches
- 6 jammer_generic.module \_jammer_generic_remove_element()
Helper function, recursive.
1 call to _jammer_generic_remove_element()
- jammer_generic_form_alter in ./
jammer_generic.module - Implements hook_form_alter().
File
- ./
jammer_generic.module, line 166 - Remove configured form elements from forms.
Code
function _jammer_generic_remove_element($value_array, $key, $element_id) {
if ($key === $element_id) {
$value_array['#access'] = FALSE;
}
foreach (element_children($value_array) as $value_key) {
$value_array[$value_key] = _jammer_generic_remove_element($value_array[$value_key], $value_key, $element_id);
// Recursive.
}
return $value_array;
}