private function getActivatedScrum()
 {
     $scrum_was_activated = $this->config_manager->scrumIsActivatedForProject($this->project_id);
     $scrum_is_activated = $this->request->get('activate-scrum');
     if ($scrum_is_activated && !$scrum_was_activated) {
         $this->response->scrumActivated();
     }
     return $scrum_is_activated;
 }
 public function updateConfiguration()
 {
     if (!$this->request->exist('kanban-title-admin')) {
         $this->response->missingKanbanTitle();
         return;
     }
     $kanban_is_activated = $this->getActivatedKanban();
     $this->config_manager->updateConfiguration($this->project_id, $this->config_manager->scrumIsActivatedForProject($this->project_id), $kanban_is_activated, $this->config_manager->getScrumTitle($this->project_id), $this->getKanbanTitle());
     if ($kanban_is_activated) {
         $this->first_kanban_creator->createFirstKanban();
     }
     $this->response->kanbanConfigurationUpdated();
 }
 private function getAdminScrumPresenter(PFUser $user, $group_id)
 {
     $can_create_planning = true;
     $tracker_uri = '';
     $root_planning_name = '';
     $potential_planning_trackers = array();
     $root_planning = $this->planning_factory->getRootPlanning($user, $group_id);
     $scrum_activated = $this->config_manager->scrumIsActivatedForProject($group_id);
     if ($root_planning) {
         $can_create_planning = count($this->planning_factory->getAvailablePlanningTrackers($user, $group_id)) > 0;
         $tracker_uri = $root_planning->getPlanningTracker()->getUri();
         $root_planning_name = $root_planning->getName();
         $potential_planning_trackers = $this->planning_factory->getPotentialPlanningTrackers($user, $group_id);
     }
     return new AdminScrumPresenter($this->getPlanningAdminPresenterList($user, $group_id, $root_planning_name), $group_id, $can_create_planning, $tracker_uri, $root_planning_name, $potential_planning_trackers, $scrum_activated, $this->config_manager->getScrumTitle($group_id));
 }
 private function showPHP53Home()
 {
     $user = $this->request->getCurrentUser();
     $plannings = $this->planning_factory->getNonLastLevelPlannings($user, $this->group_id);
     $last_plannings = $this->planning_factory->getLastLevelPlannings($user, $this->group_id);
     $kanban_is_activated = $this->config_manager->kanbanIsActivatedForProject($this->group_id);
     $scrum_is_configured = !empty($plannings) || !empty($last_plannings);
     if (!$scrum_is_configured && !$kanban_is_activated) {
         return $this->showEmptyHome();
     }
     $presenter = new Planning_Presenter_HomePresenter($this->getMilestoneAccessPresenters($plannings), $this->group_id, $this->getLastLevelMilestonesPresenters($last_plannings, $user), $this->request->get('period'), $this->getProjectFromRequest()->getPublicName(), $kanban_is_activated, $user, $this->kanban_manager->getTrackersWithKanbanUsageAndHierarchy($this->group_id, $user), $this->getKanbanSummaryPresenters(), $this->config_manager->scrumIsActivatedForProject($this->group_id), $scrum_is_configured, $this->config_manager->getScrumTitle($this->group_id), $this->config_manager->getKanbanTitle($this->group_id));
     return $this->renderToString('home', $presenter);
 }