class EntityShareFieldCollectionExport in Entity Share 7
A class to export the field collection.
Hierarchy
Expanded class hierarchy of EntityShareFieldCollectionExport
File
- modules/
entity_share_field_collection/ includes/ entity_share_field_collection.export.inc, line 11 - Class for handling Field Collection Export.
View source
class EntityShareFieldCollectionExport extends EntityShareFieldCollectionAbstract {
/**
* Manage field collection for the export.
*/
public function exportDatas() {
// Check if the field type is managed by the module.
if (!$this
->isManagedFieldType()) {
return;
}
// If we already come from content field walk
// (field collection of field collection...).
if (isset($this->fieldData['entity_type']) && $this->fieldData['entity_type'] == $this->fieldEntityType) {
$field_collection = (object) $this->fieldData;
}
else {
$field_value = $this->fieldData['value'];
$field_collection = field_collection_item_load($field_value);
}
$field_export = new EntityShareEntityExport($field_collection);
$field_collection = $field_export
->execute();
$this->fieldData = get_object_vars($field_collection);
}
}