You are here

function GLExchange::getCompletedTargets in GlobalLink Connect for Drupal 7.7

* Get completed targets for all projects * *

Parameters

* $maxResults: * Maximum number of completed targets to return in this call * @return Array of completed PDTarget

File

gl_ws/glc/GLExchange.php, line 674

Class

GLExchange

Code

function getCompletedTargets($maxResults) {
  $projects = $this
    ->getProjects();
  $tickets = array();
  $i = 0;
  foreach ($projects as $project) {
    $tickets[$i++] = $project->ticket;
  }
  $getCompletedTargetsByProjectsRequest = new getCompletedTargetsByProjects();
  $getCompletedTargetsByProjectsRequest->projectTickets = $tickets;
  $getCompletedTargetsByProjectsRequest->maxResults = $maxResults;
  $completedTargets = $this->targetService
    ->getCompletedTargetsByProjects($getCompletedTargetsByProjectsRequest)->return;
  return $this
    ->_convertTargetsToInternal($completedTargets);
}