function bulk_photo_nodes_is_required in Bulk File Nodes 7
Checks if given element is required.
Parameters
array $element: The first element to recursively check for #required = TRUE.
1 call to bulk_photo_nodes_is_required()
- bulk_photo_nodes_required_optional in ./
bulk_photo_nodes.module - Set required/optional bulk photo node fields.
File
- ./
bulk_photo_nodes.module, line 872 - hooks and helper functions for bulk photo node.
Code
function bulk_photo_nodes_is_required(&$element) {
if (!$element) {
return FALSE;
}
if (isset($element['#required']) && $element['#required']) {
return TRUE;
}
$children = element_children($element);
if ($children) {
foreach ($children as $child) {
if (bulk_photo_nodes_is_required($element[$child])) {
return TRUE;
}
}
}
return FALSE;
}