You are here

function field_collection_add_child_translation_handler in Field collection 7

Registers a child entity translation handler for the given element.

1 call to field_collection_add_child_translation_handler()
field_collection_field_widget_form in ./field_collection.module
Implements hook_field_widget_form().
1 string reference to 'field_collection_add_child_translation_handler'
field_collection_field_widget_form in ./field_collection.module
Implements hook_field_widget_form().

File

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

Code

function field_collection_add_child_translation_handler($element) {
  $handler = entity_translation_get_handler($element['#host_entity_type'], $element['#host_entity']);
  $handler
    ->addChild('field_collection_item', $element['#field_collection_item']);
  return $element;
}