function civicrm_entity_contact_assign_rel_type_list_field_field_is_empty in CiviCRM Entity 7.2
Implements hook_field_is_empty().
Parameters
$item:
$field:
Return value
bool
File
- modules/
civicrm_entity_contact_assign_rel_type_list_field/ civicrm_entity_contact_assign_rel_type_list_field.module, line 237 - Provide CiviCRM Entity Contact Assign Relationship Type List Field Type. Provides a widget for adding/removing a contacts relationships to a configured global contact.
Code
function civicrm_entity_contact_assign_rel_type_list_field_field_is_empty($item, $field) {
if (!empty($item['relationship_types'])) {
if (is_array($item['relationship_types'])) {
foreach ($item['relationship_types'] as $id => $value) {
if ($value) {
return FALSE;
}
}
}
elseif ($item['relationship_types']) {
return FALSE;
}
}
return TRUE;
}