You are here

function field_collection_field_item_to_ids in Field collection 7

Get an array of field collection item IDs stored in the given field items.

3 calls to field_collection_field_item_to_ids()
field_collection_entity_translation_insert in ./field_collection.module
Implements hook_entity_translation_insert().
field_collection_field_delete in ./field_collection.module
Implements hook_field_delete().
field_collection_field_update in ./field_collection.module
Implements hook_field_update().

File

./field_collection.module, line 763
Module implementing field collection field type.

Code

function field_collection_field_item_to_ids($items) {
  $ids = array();
  foreach ($items as $item) {
    if (!empty($item['value'])) {
      $ids[] = $item['value'];
    }
  }
  return $ids;
}