1 entityreference.module | entityreference_field_is_empty($item, $field) |
Implements hook_field_is_empty().
File
- core/
modules/ entityreference/ entityreference.module, line 95 - Entityreference primary module file.
Code
function entityreference_field_is_empty($item, $field) {
$empty = !isset($item['target_id']) || !is_numeric($item['target_id']);
// Invoke the behaviors to allow them to override the empty status.
foreach (entityreference_get_behavior_handlers($field) as $handler) {
$handler->is_empty_alter($empty, $item, $field);
}
return $empty;
}