You are here

function GLExchange::getCancelledTargets in GlobalLink Connect for Drupal 7.7

* Get cancelled targets for all projects * *

Parameters

* $maxResults: * Maximum number of cancelled targets to return. This * configuration is to avoid time-outs in case the number of * targets is very large. * @return Array of cancelled PDTarget

File

gl_ws/glc/GLExchange.php, line 568

Class

GLExchange

Code

function getCancelledTargets($maxResults) {
  $projects = $this
    ->getProjects();
  $tickets = array();
  $i = 0;
  foreach ($projects as $project) {
    $tickets[$i++] = $project->ticket;
  }
  $getCanceledTargetsByProjectsRequest = new getCanceledTargetsByProjects();
  $getCanceledTargetsByProjectsRequest->projectTickets = $tickets;
  $getCanceledTargetsByProjectsRequest->maxResults = $maxResults;
  $cancelledTargets = $this->targetService
    ->getCanceledTargetsByProjects($getCanceledTargetsByProjectsRequest)->return;
  return $this
    ->_convertTargetsToInternal($cancelledTargets);
}