You are here

public function ParagraphsItemEntity::export in Paragraphs 7

Export the paragraphs item.

Since paragraphs entities are not directly exportable (that is, do not have 'exportable' set to TRUE in hook_entity_info()) and since Features calls this method when exporting the paragraphs 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

./ParagraphsItemEntity.inc, line 488

Class

ParagraphsItemEntity
Entity implementation for the paragraphs entity.

Code

public function export($prefix = '') {

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