当前位置: 首页>>代码示例>>PHP>>正文


PHP Planning::setBacklogTrackers方法代码示例

本文整理汇总了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;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:aPlanning.php

示例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;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:PlanningFactory.class.php

示例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');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:18,代码来源:PlanningFactoryTest.php


注:本文中的Planning::setBacklogTrackers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。