You are here

function entityreference_field_is_empty in Entity reference 8

Same name and namespace in other branches
  1. 7 entityreference.module \entityreference_field_is_empty()

Implements hook_field_is_empty().

1 call to entityreference_field_is_empty()
entityreference_field_validate in ./entityreference.module
Implements hook_field_validate().

File

./entityreference.module, line 65
Provides a field that can reference other entities.

Code

function entityreference_field_is_empty($item, $field) {
  return !isset($item['target_id']) || !is_numeric($item['target_id']);
}