private function getKanbanTitle()
 {
     $old_kanban_title = $this->config_manager->getKanbanTitle($this->project_id);
     $kanban_title = trim($this->request->get('kanban-title-admin'));
     if ($kanban_title !== $old_kanban_title) {
         $this->response->kanbanTitleChanged();
     }
     if ($kanban_title == '') {
         $this->response->emptyKanbanTitle();
         $kanban_title = $old_kanban_title;
     }
     return $kanban_title;
 }
 public function updateConfiguration()
 {
     if (!$this->request->exist('scrum-title-admin')) {
         $this->response->missingScrumTitle();
         return;
     }
     $scrum_is_activated = $this->getActivatedScrum();
     $this->config_manager->updateConfiguration($this->project_id, $scrum_is_activated, $this->config_manager->kanbanIsActivatedForProject($this->project_id), $this->getScrumTitle(), $this->config_manager->getKanbanTitle($this->project_id));
     if ($scrum_is_activated) {
         $this->first_scrum_creator->createFirstScrum();
     }
     $this->response->scrumConfigurationUpdated();
 }
 private function getAdminPresenter(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);
     $kanban_activated = $this->config_manager->kanbanIsActivatedForProject($group_id);
     $scrum_activated = $this->config_manager->scrumIsActivatedForProject($group_id);
     $all_activated = $kanban_activated && $scrum_activated;
     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 AdminPresenter($this->getPlanningAdminPresenterList($user, $group_id, $root_planning_name), $group_id, $can_create_planning, $tracker_uri, $root_planning_name, $potential_planning_trackers, $kanban_activated, $scrum_activated, $all_activated, $this->config_manager->getScrumTitle($group_id), $this->config_manager->getKanbanTitle($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);
 }
 private function getAdminKanbanPresenter(PFUser $user, $project_id)
 {
     $has_kanban = count($this->kanban_factory->getListOfKanbansForProject($user, $project_id)) > 0;
     return new AdminKanbanPresenter($project_id, $this->config_manager->kanbanIsActivatedForProject($project_id), $this->config_manager->getKanbanTitle($project_id), $has_kanban);
 }