public function getPaginatedSubMilestonesRepresentations(Planning_Milestone $milestone, PFUser $user, $representation_type, Tuleap\AgileDashboard\Milestone\Criterion\ISearchOnStatus $criterion, $limit, $offset, $order) { $sub_milestones = $this->milestone_factory->getPaginatedSubMilestones($user, $milestone, $criterion, $limit, $offset, $order); $submilestones_representations = array(); foreach ($sub_milestones->getMilestones() as $submilestone) { $submilestones_representations[] = $this->getMilestoneRepresentation($submilestone, $user, $representation_type); } return new AgileDashboard_Milestone_PaginatedMilestonesRepresentations($submilestones_representations, $sub_milestones->getTotalSize()); }