public function __construct(Planning $planning, array $available_backlog_trackers, array $available_planning_trackers)
 {
     parent::__construct($planning);
     $this->group_id = $planning->getGroupId();
     $this->available_backlog_trackers = $this->getPlanningTrackerPresenters($available_backlog_trackers);
     $this->available_planning_trackers = $this->getPlanningTrackerPresenters($available_planning_trackers);
 }
 public function __construct(PlanningPermissionsManager $planning_permissions_manager, Planning $planning, array $available_backlog_trackers, array $available_planning_trackers, $cardwall_admin)
 {
     parent::__construct($planning);
     $this->planning_permissions_manager = $planning_permissions_manager;
     $this->planning_id = $planning->getId();
     $this->group_id = $planning->getGroupId();
     $this->available_backlog_trackers = $available_backlog_trackers;
     $this->available_planning_trackers = $available_planning_trackers;
     $this->cardwall_admin = $cardwall_admin;
 }
Esempio n. 3
0
 /**
  * Instanciates a new presenter.
  * 
  * TODO:
  *   - $planning could be retrieved from $milestone
  *   - use $milestone->getPlanning()->getAllMilestones() instead of $available_milestones ?
  * 
  * @param Planning                              $planning                    The planning (e.g. Release planning, Sprint planning).
  * @param Tracker_CrossSearch_SearchContentView $backlog_search_view         The view allowing to search through the backlog artifacts.
  * @param array                                 $available_milestones        The available milestones for a given planning (e.g. Sprint 2, Release 1.0).
  * @param Tracker_Artifact                      $milestone                   The artifact with planning being displayed right now.
  * @param User                                  $current_user                The user to which the artifact plannification UI is presented.
  * @param string                                $planning_redirect_parameter The request parameter representing the artifact being planned, used for redirection (e.g: "planning[2]=123").
  */
 public function __construct(Planning $planning, Tracker_CrossSearch_SearchContentView $backlog_search_view, array $available_milestones, Planning_Milestone $milestone, User $current_user, Codendi_Request $request, $planning_redirect_parameter, $planning_redirect_to_new)
 {
     parent::__construct($planning);
     $this->milestone = $milestone;
     $this->available_milestones = $available_milestones;
     $this->backlog_search_view = $backlog_search_view;
     $this->current_user = $current_user;
     $this->request = $request;
     $this->planning_redirect_parameter = $planning_redirect_parameter;
     $this->planning_redirect_to_new = $planning_redirect_to_new;
     $this->current_uri = preg_replace('/&pane=.*(?:&|$)/', '', $_SERVER['REQUEST_URI']);
     $this->planned_artifacts_tree = $this->buildPlannedArtifactsTree();
 }