function office_hours_instance_is_empty in Office Hours 7
Checks if an instance of the office hours field type is empty.
Parameters
array $items: An array of $entity->{$field['field_name']}[$langcode]
Return value
boolean Whether or not the instance is considered empty.
1 call to office_hours_instance_is_empty()
- office_hours_field_validate in includes/
office_hours.field.inc - Implements hook_field_validate(). Is called a.o. when saving the content type field (default value) and content.
File
- includes/
office_hours.field.inc, line 268 - Implements the office_hours Field.
Code
function office_hours_instance_is_empty($items) {
foreach ($items as $delta => $item) {
if (!office_hours_field_is_empty($item, 'office_hours_select')) {
return FALSE;
}
}
return TRUE;
}