You are here

protected function EntityShareMediasScaldExport::generateExportRteMediaString in Entity Share 7

Generate the export string for the scald atom.

Parameters

int $sid: Scald atom id.

string $context: Scald context.

string $infos: Scald additional information.

Return value

string The export string.

File

modules/entity_share_medias/modules/entity_share_medias_scald/includes/entity_share_medias_scald.export.inc, line 110
Class for handling scald Medias Export.

Class

EntityShareMediasScaldExport
Class for scald atoms export.

Code

protected function generateExportRteMediaString($sid, $context, $infos) {

  // Load scald atom.
  $scald_atom = $this
    ->loadScaldAtom($sid);

  // Uuid.
  $uuid = $this
    ->getUniqueIdFromAtom($scald_atom);

  // Add the file url in a dimension of the object.
  $file_url = '';
  if (!empty($scald_atom->base_entity)) {
    $file_url = file_create_url($scald_atom->base_entity->uri);
  }
  return <<<EXPORT
[scald={<span class="php-variable">$uuid</span>}:{<span class="php-variable">$context</span>} url={<span class="php-variable">$file_url</span>} orisid={<span class="php-variable">$sid</span>} entity_share=1 {<span class="php-variable">$infos</span>}]
EXPORT;
}