You are here

public function FieldCollectionItemEntity::export in Field collection 7

Export the field collection item.

Since field collection entities are not directly exportable (i.e., do not have 'exportable' set to TRUE in hook_entity_info()) and since Features calls this method when exporting the field collection as a field attached to another entity, we return the export in the format expected by Features, rather than in the normal Entity::export() format.

Overrides Entity::export

File

./field_collection.entity.inc, line 635

Class

FieldCollectionItemEntity
Class for field_collection_item entities.

Code

public function export($prefix = '') {

  // Based on code in EntityDefaultFeaturesController::export_render().
  $export = "entity_import('" . $this
    ->entityType() . "', '";
  $export .= addcslashes(parent::export(), '\\\'');
  $export .= "')";
  return $export;
}