예제 #1
0
 public function removeArtifactFromSource(PFUser $user, array $add)
 {
     $to_add = array();
     foreach ($add as $move) {
         if (!isset($move['id']) || !is_int($move['id'])) {
             throw new RestException(400, "invalid value specified for `id`. Expected: integer");
         }
         if (isset($move['remove_from']) && !is_int($move['remove_from'])) {
             throw new RestException(400, "invalid value specified for `remove_from`. Expected: integer");
         }
         $to_add[] = $move['id'];
         if (isset($move['remove_from'])) {
             $from_artifact = $this->getArtifact($move['remove_from']);
             $this->artifactlink_updater->updateArtifactLinks($user, $from_artifact, array(), array($move['id']));
         }
     }
     return $to_add;
 }
예제 #2
0
 private function addMissingElementsToBacklog(Planning_Milestone $milestone, PFUser $user, array $to_add)
 {
     if (count($to_add) > 0) {
         $this->artifactlink_updater->updateArtifactLinks($user, $milestone->getArtifact(), $to_add, array());
     }
 }