public static function FieldHelper::hasDelta in Helper 7
1 call to FieldHelper::hasDelta()
File
- lib/
FieldHelper.php, line 38
Class
Code
public static function hasDelta($entity_type, $entity, $field_name, $delta) {
if (!empty($entity->{$field_name}) && ($items = field_get_items($entity_type, $entity, $field_name))) {
return !empty($items[$delta]);
}
}