You are here

function cer_get_field_collection_depth in Corresponding Entity References 7.3

Gets the zero-based depth of a field collection.

1 string reference to 'cer_get_field_collection_depth'
cer_entity_property_info_alter in ./cer.module
Implements hook_entity_property_info_alter().

File

./cer.properties.field_collection.inc, line 53
Contains entity property callback functions for the 'cer' struct exposed to Entity API on field collections.

Code

function cer_get_field_collection_depth(array $data, array $options, $property, $data_type, array $info) {
  $lineage = cer_get_field_collection_lineage_array($data, $options, $property, $data_type, $info);
  return sizeof($lineage) - 1;
}