Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions inc/Smartling/Base/SmartlingCoreDownloadTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function downloadTranslationBySubmission(SubmissionEntity $entity): void
$entity->getFileUri(),
])
);
$data = (string)$this->getApiWrapper()->downloadFile($entity);
$data = $this->getApiWrapper()->downloadFile($entity);
$msg = vsprintf('Downloaded file for submission id = \'%s\'. Dump: %s', [$entity->getId(),
base64_encode($data)]);
$this->getLogger()->debug($msg);
Expand All @@ -74,9 +74,7 @@ public function downloadTranslationBySubmission(SubmissionEntity $entity): void
$entity->getTargetLocale(),
])
);
if (count($this->acfDynamicSupport->getDefinitions()) === 0) {
$this->acfDynamicSupport->run();
}
$this->acfDynamicSupport->runIfRequired();
$this->applyXML($entity, $data, $this->xmlHelper, $this->postContentHelper);
LiveNotificationController::pushNotification(
$this
Expand Down Expand Up @@ -122,12 +120,12 @@ public function downloadTranslationBySubmission(SubmissionEntity $entity): void
}
}

public function downloadTranslationBySubmissionId($id)
public function downloadTranslationBySubmissionId($id): void
{
do_action(ExportedAPI::ACTION_SMARTLING_DOWNLOAD_TRANSLATION, $this->loadSubmissionEntityById($id));
}

public function downloadTranslation($contentType, $sourceBlog, $sourceEntity, $targetBlog, $targetEntity = null)
public function downloadTranslation($contentType, $sourceBlog, $sourceEntity, $targetBlog, $targetEntity = null): void
{
$submission = $this->getTranslationHelper()
->prepareSubmission($contentType, $sourceBlog, $sourceEntity, $targetBlog, $targetEntity);
Expand Down
Loading