You are here

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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityShareFieldCollectionAbstract::$delta protected property Delta of the field.
EntityShareFieldCollectionAbstract::$entity protected property Entity object.
EntityShareFieldCollectionAbstract::$entityShareEntity protected property Entity share object.
EntityShareFieldCollectionAbstract::$fieldData protected property Data of the field.
EntityShareFieldCollectionAbstract::$fieldEntityType protected property Current field entity type.
EntityShareFieldCollectionAbstract::$fieldInfo protected property Field metadatas.
EntityShareFieldCollectionAbstract::$fieldLang protected property Language of the current data.
EntityShareFieldCollectionAbstract::$fieldName protected property Field name.
EntityShareFieldCollectionAbstract::$fieldType protected property Field type.
EntityShareFieldCollectionAbstract::$managedFieldTypes protected property Types managed by the class.
EntityShareFieldCollectionAbstract::isManagedFieldType public function Check if the field type is managed.
EntityShareFieldCollectionAbstract::__construct public function Constructor. Initialize properties.
EntityShareFieldCollectionExport::exportDatas public function Manage field collection for the export.