You are here

function GLExchange::startSubmission in GlobalLink Connect for Drupal 7.7

* * Start Submission * *

Return value

Submission ticket

File

gl_ws/glc/GLExchange.php, line 860

Class

GLExchange

Code

function startSubmission() {
  if (!isset($this->submission) || !isset($this->submission->project) || !isset($this->submission->name)) {
    throw new Exception("Please initialize submission first.");
  }
  if (!isset($this->submission->ticket) || $this->submission->ticket == "") {
    throw new Exception("Please upload a translatable document first.");
  }
  $submissionInfo = $this
    ->_createSubmissionInfo();
  $startSubmissionRequest = new startSubmission();
  $startSubmissionRequest->submissionId = $this->submission->ticket;
  $startSubmissionRequest->submissionInfo = $submissionInfo;
  $this->submissionService
    ->startSubmission($startSubmissionRequest);
  $submissionTicket = $this->submission->ticket;
  $this->submission = NULL;
  return $submissionTicket;
}