function _bibcite_entity_get_target_delta in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/bibcite_entity.batch.inc \_bibcite_entity_get_target_delta()
Find target identifier in field value.
Parameters
array $field_value: Field value array.
int $target_id: Target entity identifier.
Return value
int|null Position of target entity or NULL if target entity is not present in value.
1 call to _bibcite_entity_get_target_delta()
- _bibcite_entity_process_field_value in modules/
bibcite_entity/ bibcite_entity.batch.inc - Find source field value and replace or remove it.
File
- modules/
bibcite_entity/ bibcite_entity.batch.inc, line 121 - Batch callbacks.
Code
function _bibcite_entity_get_target_delta(array $field_value, $target_id) {
foreach ($field_value as $delta => $value) {
if ($value['target_id'] == $target_id) {
return $delta;
}
}
return NULL;
}