/** * @return Cardwall_PaneContentPresenter */ private function getPresenterUsingMappedFields(Cardwall_OnTop_Config_ColumnCollection $columns) { $planning = $this->milestone->getPlanning(); $raw_board_builder = new Cardwall_RawBoardBuilder(); $display_preferences = $raw_board_builder->getDisplayPreferences($this->milestone, $this->user); $column_preferences = new Cardwall_UserPreferences_Autostack_AutostackDashboard($this->user, $this->config->getTracker()); $column_autostack = new Cardwall_UserPreferences_UserPreferencesAutostackFactory(); $column_autostack->setAutostack($columns, $column_preferences); $redirect_parameter = 'cardwall[agile][' . $planning->getId() . ']=' . $this->milestone->getArtifactId(); $this->milestone = $this->milestone_factory->updateMilestoneContextualInfo($this->user, $this->milestone); $board = $raw_board_builder->buildBoardUsingMappedFields($this->user, $this->artifact_factory, $this->milestone, $this->config, $columns); return new Cardwall_PaneContentPresenter($board, $this->getQrCode(), $redirect_parameter, $this->getSwitchDisplayAvatarsURL(), $display_preferences->shouldDisplayAvatars(), $planning, $this->milestone, $this->getProgressPresenter()); }
/** * @return Planning_Presenter_MilestoneSummaryPresenter[] */ private function getMilestoneSummaryPresenters(Planning $last_planning, PFUser $user) { $presenters = array(); $has_cardwall = $this->hasCardwall($last_planning); $last_planning_current_milestones = $this->getPlanningMilestonesDependingOnTimePeriodOrStatus($last_planning); if (empty($last_planning_current_milestones)) { return $presenters; } foreach ($last_planning_current_milestones as $milestone) { $this->milestone_factory->addMilestoneAncestors($user, $milestone); $milestone = $this->milestone_factory->updateMilestoneContextualInfo($user, $milestone); if ($milestone->hasUsableBurndownField()) { $burndown_data = $milestone->getBurndownData($user); $presenters[] = new Planning_Presenter_MilestoneBurndownSummaryPresenter($milestone, $this->plugin_path, $has_cardwall, $burndown_data); } else { $presenters[] = new Planning_Presenter_MilestoneSummaryPresenter($milestone, $this->plugin_path, $has_cardwall, $this->milestone_factory->getMilestoneStatusCount($user, $milestone)); } } return $presenters; }
/** * @return AgileDashboard_Milestone_Pane_Planning_PlanningSubMilestonePresenter */ public function getPlanningSubMilestonePresenter(PFUser $user, Planning_ArtifactMilestone $milestone, $redirect_to_self) { $this->milestone_factory->updateMilestoneContextualInfo($user, $milestone); return new AgileDashboard_Milestone_Pane_Planning_PlanningSubMilestonePresenter($milestone, $redirect_to_self, $user, $this->icon_factory->getIconLinkPresenterCollection($milestone)); }