You are here

function globallink_get_status in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 gl_ws/gl_ws_common.inc \globallink_get_status()
7 calls to globallink_get_status()
globallink_block_get_submission_status in globallink_block/globallink_block.inc
Gets block submission status.
globallink_entity_get_submission_status in globallink_entity/globallink_entity.inc
Gets entity submission status.
globallink_fieldable_panels_get_submission_status in globallink_fieldable_panels/globallink_fieldable_panels.inc
Gets fieldable panels submission status.
globallink_get_submission_status in ./globallink_node.inc
Gets submission status for a translation.
globallink_menu_get_submission_status in globallink_menu/globallink_menu.inc
Gets menu submission status.

... See full list

File

gl_ws/gl_ws_common.inc, line 221

Code

function globallink_get_status($pd_obj, $submission_ticket) {
  $username = $pd_obj->username;
  $password = $pd_obj->password;
  $url = $pd_obj->url;
  $session_service = new SessionService2(GL_WSDL_PATH . 'SessionService2.wsdl', array(
    'location' => $url . '/services/SessionService2',
  ));
  $submission_service = new SubmissionService2(GL_WSDL_PATH . 'SubmissionService2.wsdl', array(
    'location' => $url . '/services/SubmissionService2',
  ));
  $token = globallink_login($session_service, $username, $password);
  $ticket_request = new findByTicket();
  $ticket_request->userId = $token;
  $ticket_request->ticket = $submission_ticket;
  $find_by_ticket_response = $submission_service
    ->findByTicket($ticket_request);
  $result = $find_by_ticket_response->return;
  $status = '';
  if (isset($result->status)) {
    $status = $result->status->name;
  }
  return $status;
}