本文整理汇总了PHP中Planning::setBacklogTrackers方法的典型用法代码示例。如果您正苦于以下问题:PHP Planning::setBacklogTrackers方法的具体用法?PHP Planning::setBacklogTrackers怎么用?PHP Planning::setBacklogTrackers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Planning
的用法示例。
在下文中一共展示了Planning::setBacklogTrackers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
public function build()
{
$planning = new Planning($this->id, $this->name, $this->group_id, $this->backlog_title, $this->plan_title, $this->backlog_tracker_ids, $this->planning_tracker_id);
if ($this->planning_tracker) {
$planning->setPlanningTracker($this->planning_tracker);
}
if ($this->backlog_trackers) {
$planning->setBacklogTrackers($this->backlog_trackers);
}
return $planning;
}
示例2: getPlanningsByBacklogTracker
/**
* Returns all the Planning that use given tracker as backlog tracker
*
* Given:
* Epic -> Product
* Epic -> Release
* Story -> Sprint
* When getPlanningsByBacklogTracker(Epic) -> [Product, Release]
* When getPlanningsByBacklogTracker(Story) -> [Sprint]
*
* @param Tracker $backlog_tracker
*
* @return Planning
*/
public function getPlanningsByBacklogTracker(Tracker $backlog_tracker)
{
$plannings = array();
foreach ($this->dao->searchByBacklogTrackerId($backlog_tracker->getId()) as $planning) {
$p = new Planning($planning['id'], $planning['name'], $planning['group_id'], $planning['backlog_title'], $planning['plan_title'], array($backlog_tracker->getId()), $planning['planning_tracker_id']);
$p->setBacklogTrackers(array($backlog_tracker));
$p->setPlanningTracker($this->getPlanningTracker($p));
$plannings[] = $p;
}
return $plannings;
}
示例3: itCreatesNewPlanningWithValidBacklogAndPlanningTrackers
public function itCreatesNewPlanningWithValidBacklogAndPlanningTrackers()
{
$backlog_tracker = mock('Tracker');
$planning_tracker = mock('Tracker');
$form_element_factory = mock('Tracker_FormElementFactory');
stub($backlog_tracker)->getId()->returns(78);
stub($planning_tracker)->getId()->returns(45);
$my_planning = new Planning(null, null, null, null, null, array(78), 45);
$my_planning->setBacklogTrackers(array($backlog_tracker))->setPlanningTracker($planning_tracker);
stub($this->planning_factory)->getRootPlanning()->returns($my_planning);
stub($this->tracker_factory)->getTrackerById(45)->returns($backlog_tracker);
stub($this->tracker_factory)->getTrackerById(78)->returns($planning_tracker);
$planning = $this->planning_factory->getVirtualTopPlanning($this->user, 56);
$this->assertIsA($planning, 'Planning');
$this->assertIsA($planning->getPlanningTracker(), 'Tracker');
$backlog_trackers = $planning->getBacklogTrackers();
$this->assertIsA($backlog_trackers[0], 'Tracker');
}