當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TrackerFactory類代碼示例

本文整理匯總了PHP中TrackerFactory的典型用法代碼示例。如果您正苦於以下問題:PHP TrackerFactory類的具體用法?PHP TrackerFactory怎麽用?PHP TrackerFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TrackerFactory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: instance

 /**
  * The singleton method
  * 
  * @return Tracker_Hierarchy_HierarchicalTrackerFactory
  */
 public static function instance()
 {
     if (!self::$instance) {
         self::$instance = new Tracker_Hierarchy_HierarchicalTrackerFactory(TrackerFactory::instance(), new Tracker_Hierarchy_Dao());
     }
     return self::$instance;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:12,代碼來源:HierarchicalTrackerFactory.class.php

示例2: __construct

 public function __construct(AgileDashboard_Kanban $kanban, PFUser $user, $user_is_kanban_admin, $language, $project_id)
 {
     $user_preferences = new AgileDashboard_KanbanUserPreferences();
     $kanban_representation_builder = new Tuleap\AgileDashboard\REST\v1\Kanban\KanbanRepresentationBuilder($user_preferences, new AgileDashboard_KanbanColumnFactory(new AgileDashboard_KanbanColumnDao(), $user_preferences), TrackerFactory::instance(), Tracker_FormElementFactory::instance());
     $this->kanban_representation = json_encode($kanban_representation_builder->build($kanban, $user));
     $this->user_is_kanban_admin = (int) $user_is_kanban_admin;
     $this->language = $language;
     $this->project_id = $project_id;
 }
開發者ID:uniteddiversity,項目名稱:tuleap,代碼行數:9,代碼來源:KanbanPresenter.class.php

示例3: getAlreadyExistingTracker

 private function getAlreadyExistingTracker()
 {
     foreach ($this->reserved_names as $itemname) {
         if ($this->tracker_factory->isShortNameExists($itemname, $this->project->getId())) {
             return $itemname;
         }
     }
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:8,代碼來源:FirstScrumCreator.php

示例4: setColumnWipLimit

 /**
  * @throws AgileDashboard_UserNotAdminException
  *
  * @return bool
  */
 public function setColumnWipLimit(PFUser $user, AgileDashboard_Kanban $kanban, AgileDashboard_KanbanColumn $column, $wip_limit)
 {
     $project_id = $this->tracker_factory->getTrackerById($kanban->getTrackerId())->getGroupId();
     if (!$this->permissions_manager->userCanAdministrate($user, $project_id)) {
         throw new AgileDashboard_UserNotAdminException($user);
     }
     return $this->column_dao->setColumnWipLimit($column->getKanbanId(), $column->getId(), $wip_limit);
 }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:13,代碼來源:KanbanColumnManager.php

示例5: isUserAllowedToAccessKanban

 private function isUserAllowedToAccessKanban(PFuser $user, $tracker_id)
 {
     $tracker = $this->tracker_factory->getTrackerById($tracker_id);
     if (!$tracker) {
         throw new AgileDashboard_KanbanNotFoundException();
     }
     return $tracker->userCanView($user);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:8,代碼來源:KanbanFactory.class.php

示例6: getTracker

 private function getTracker(Tuleap\Tracker\REST\TrackerReference $tracker_reference)
 {
     $tracker = $this->tracker_factory->getTrackerById($tracker_reference->id);
     if (!$tracker) {
         throw new \Luracast\Restler\RestException(404, 'Tracker not found');
     }
     return $tracker;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:8,代碼來源:ArtifactCreator.class.php

示例7: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('add_mapping_on')) {
         $new_mapping_tracker = $this->tracker_factory->getTrackerById($request->get('add_mapping_on'));
         if ($new_mapping_tracker && $this->dao->create($this->tracker->getId(), $new_mapping_tracker->getId(), null)) {
             $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_mapping_added', array($new_mapping_tracker->getName())));
         }
     }
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:12,代碼來源:CreateMappingField.class.php

示例8: getChildren

 public function getChildren($tracker_id)
 {
     if (!isset($this->cache_children_of_tracker[$tracker_id])) {
         $this->cache_children_of_tracker[$tracker_id] = array();
         foreach ($this->hierarchy_dao->searchChildTrackerIds($tracker_id) as $row) {
             $this->cache_children_of_tracker[$tracker_id][] = $this->tracker_factory->getTrackerById($row['id']);
         }
     }
     return $this->cache_children_of_tracker[$tracker_id];
 }
開發者ID:nickl-,項目名稱:tuleap,代碼行數:10,代碼來源:HierarchyFactory.class.php

示例9: build

 /**
  * @return Tracker_CrossSearch_SearchView 
  */
 public function build(User $user, Project $project, Tracker_CrossSearch_Query $cross_search_query)
 {
     $report = $this->getReport($user);
     $service = $this->getService($project);
     $criteria = $this->getCriteria($user, $project, $report, $cross_search_query);
     $trackers = $this->tracker_factory->getTrackersByGroupIdUserCanView($project->getGroupId(), $user);
     $tracker_ids = $this->getTrackersIds($trackers);
     $artifacts = $this->getHierarchicallySortedArtifacts($user, $project, $tracker_ids, $cross_search_query);
     $content_view = new Tracker_CrossSearch_SearchContentView($report, $criteria, $artifacts, Tracker_ArtifactFactory::instance(), $this->form_element_factory, $user);
     return new Tracker_CrossSearch_SearchView($project, $service, $criteria, $trackers, $content_view);
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:14,代碼來源:SearchViewBuilder.class.php

示例10: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if (is_array($request->get('custom_mapping'))) {
         foreach ($request->get('custom_mapping') as $mapping_tracker_id => $is_custom) {
             $mapping_tracker = $this->tracker_factory->getTrackerById($mapping_tracker_id);
             if ($this->canDelete($is_custom, $mapping_tracker) && $this->delete($mapping_tracker)) {
                 $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_mapping_removed', array($mapping_tracker->getName())));
             }
         }
     }
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:14,代碼來源:DeleteMappingFields.class.php

示例11: getTrackersUsedAsKanban

 /**
  * @return Tracker[]
  */
 public function getTrackersUsedAsKanban(Project $project)
 {
     $trackers = array();
     foreach ($this->dao->getKanbansForProject($project->getId()) as $row) {
         $tracker = $this->tracker_factory->getTrackerById($row['tracker_id']);
         if ($tracker) {
             $trackers[] = $tracker;
         }
     }
     return $trackers;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:14,代碼來源:KanbanManager.class.php

示例12: export

 /**
  *
  * @param SimpleXMLElement $root
  * Export in XML the list of tracker with a cardwall
  */
 public function export(SimpleXMLElement $root)
 {
     $cardwall_node = $root->addChild(CardwallConfigXml::NODE_CARDWALL);
     $trackers_node = $cardwall_node->addChild(CardwallConfigXml::NODE_TRACKERS);
     $trackers = $this->tracker_factory->getTrackersByGroupId($this->project->getId());
     foreach ($trackers as $tracker) {
         $this->addTrackerChild($tracker, $trackers_node);
     }
     $rng_path = realpath(CARDWALL_BASE_DIR . '/../www/resources/xml_project_cardwall.rng');
     $this->xml_validator->validate($cardwall_node, $rng_path);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:16,代碼來源:CardwallConfigXmlExport.class.php

示例13: exportSingleTrackerToXml

 public function exportSingleTrackerToXml(SimpleXMLElement $xml_content, $tracker_id, PFUser $user, ZipArchive $archive)
 {
     $xml_field_mapping = array();
     $xml_trackers = $xml_content->addChild('trackers');
     $tracker = $this->tracker_factory->getTrackerById($tracker_id);
     if ($tracker->isActive()) {
         $tracker_xml = $xml_trackers->addChild('tracker');
         $tracker->exportToXMLInProjectExportContext($tracker_xml, $xml_field_mapping);
         $this->artifact_xml_xport->export($tracker, $tracker_xml, $user, $archive);
     }
     $this->rng_validator->validate($xml_trackers, dirname(TRACKER_BASE_DIR) . '/www/resources/trackers.rng');
     return $xml_trackers;
 }
開發者ID:ndjido,項目名稱:tuleap,代碼行數:13,代碼來源:TrackerXmlExport.class.php

示例14: process

 /**
  * Process the system event
  *
  * @return Boolean
  */
 public function process()
 {
     try {
         $tracker_id = (int) $this->getRequiredParameter(0);
         $tracker = $this->tracker_factory->getTrackerById($tracker_id);
         $this->actions->reIndexTracker($tracker);
         $this->done('All Tracker artifacts re-indexed correctly');
         return true;
     } catch (Exception $e) {
         $this->error($e->getMessage());
     }
     return false;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:18,代碼來源:SystemEvent_FULLTEXTSEARCH_TRACKER_REINDEX.class.php

示例15: getTrackerFromMailHeader

 /**
  * @return Tracker
  */
 private function getTrackerFromMailHeader($mail_header)
 {
     $mail_userpart = $this->extractMailUserParts($mail_header);
     if (count($mail_userpart) !== 2) {
         throw new Tracker_Artifact_MailGateway_TrackerIdMissingException();
     }
     $tracker_id = (int) $mail_userpart[1];
     $tracker = $this->tracker_factory->getTrackerById($tracker_id);
     if ($tracker === null) {
         throw new Tracker_Artifact_MailGateway_TrackerDoesNotExistException();
     }
     return $tracker;
 }
開發者ID:ndjido,項目名稱:tuleap,代碼行數:16,代碼來源:IncomingMessageInsecureBuilder.class.php


注:本文中的TrackerFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。