function context_empty in Context 6
Same name and namespace in other branches
- 6.3 context.module \context_empty()
- 6.2 context.module \context_empty()
- 7.3 context.module \context_empty()
Recursive helper function to determine whether an array and its children are entirely empty.
3 calls to context_empty()
- context_ui_export in context_ui/
context_ui.admin.inc - Provides a form with an exported context definition for use in modules.
- context_ui_form_process in context_ui/
context_ui.admin.inc - Produces a context object from submitted form values.
- context_ui_form_process in context_ui/
export_ui/ context_export_ui.class.php - Modifies a context object from submitted form values.
File
- ./
context.module, line 632
Code
function context_empty($element) {
$empty = TRUE;
if (is_array($element)) {
foreach ($element as $child) {
$empty = $empty && context_empty($child);
}
}
else {
$empty = $empty && empty($element);
}
return $empty;
}