You are here

function field_collection_field_get_path in Field collection 7

Returns the base path to use for field collection items.

4 calls to field_collection_field_get_path()
FieldCollectionItemEntity::path in ./field_collection.entity.inc
Returns the path used to view the entity.
field_collection_entity_info in ./field_collection.module
Implements hook_entity_info().
field_collection_field_formatter_links in ./field_collection.module
Helper function to add links to a field collection field.
field_collection_menu in ./field_collection.module
Implements hook_menu().

File

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

Code

function field_collection_field_get_path($field) {
  if (empty($field['settings']['path'])) {
    return 'field-collection/' . strtr($field['field_name'], array(
      '_' => '-',
    ));
  }
  return $field['settings']['path'];
}