Пример #1
0
 /**
  * Removes the sub-milestone artifacts from an artifacts tree.
  *
  * @param User             $user               The user accessing the data
  * @param Tracker_Artifact $milestone_artifact The parent artifact of sub-milestones artifacts
  * @param TreeNode         $artifacts_tree     The artifacts tree to clean up
  */
 private function removeSubMilestones(User $user, Tracker_Artifact $milestone_artifact, TreeNode $artifacts_tree)
 {
     $hierarchy_children_ids = $this->getSubMilestonesArtifactIds($user, $milestone_artifact);
     foreach ($artifacts_tree->getChildren() as $node) {
         if (in_array($node->getId(), $hierarchy_children_ids)) {
             $artifacts_tree->removeChild(null, $node);
         }
     }
 }