當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。