public function __construct(\Planning_Milestone $milestone) { $this->id = JsonCast::toInt($milestone->getArtifactId()); $this->label = $milestone->getArtifactTitle(); $this->last_modified = JsonCast::toDate($milestone->getLastModifiedDate()); $this->uri = self::ROUTE . '/' . $this->id; }
public function __construct(AgileDashboard_Milestone_Backlog_BacklogItemPresenterCollection $backlog_collection, AgileDashboard_Milestone_Pane_Planning_PlanningSubMilestonePresenterCollection $submilestone_collection, Planning_Milestone $milestone, $parent_item_type, $submilestone_item_type, $add_new_submilestone_url, $can_add_submilestone, $can_plan, $redirect_to_self, array $trackers_without_initial_effort) { $this->backlog_collection = $backlog_collection; $this->submilestone_collection = $submilestone_collection; $this->parent_item_type = $parent_item_type; $this->submilestone_item_type = $submilestone_item_type; $this->add_new_submilestone_url = $add_new_submilestone_url; $this->can_add_submilestone = $can_add_submilestone; $this->can_plan = $can_plan; $this->redirect_to_self = $redirect_to_self; $this->milestone_id = $milestone->getArtifactId(); $this->milestone_planning_id = $milestone->getPlanningId(); $this->milestone_item_type = $milestone->getArtifactTitle(); foreach ($trackers_without_initial_effort as $tracker_without_initial_effort) { $this->trackers_without_initial_effort_field[] = $tracker_without_initial_effort->getName(); } }
/** * @return string The milestone title (i.e. the artifact's one). */ public function getTitle() { return $this->milestone->getArtifactTitle(); }
public function itHasATitle() { $this->milestone = new Planning_ArtifactMilestone($this->project, $this->planning, $this->artifact); $this->assertEqual($this->milestone->getArtifactTitle(), 'Foo'); }