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


PHP TrackerFactory::getTrackersByGroupId方法代码示例

本文整理汇总了PHP中TrackerFactory::getTrackersByGroupId方法的典型用法代码示例。如果您正苦于以下问题:PHP TrackerFactory::getTrackersByGroupId方法的具体用法?PHP TrackerFactory::getTrackersByGroupId怎么用?PHP TrackerFactory::getTrackersByGroupId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TrackerFactory的用法示例。


在下文中一共展示了TrackerFactory::getTrackersByGroupId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exportToXml

 public function exportToXml($group_id, SimpleXMLElement $xml_content)
 {
     $exported_trackers = array();
     $xml_field_mapping = array();
     $xml_trackers = $xml_content->addChild('trackers');
     foreach ($this->tracker_factory->getTrackersByGroupId($group_id) as $tracker) {
         if ($tracker->isActive()) {
             $exported_trackers[] = $tracker;
             $child = $xml_trackers->addChild('tracker');
             $tracker->exportToXML($child, $xml_field_mapping);
         }
     }
     // Cross tracker stuff needs to be exported after to ensure all references exists
     $triggers_xml = $xml_trackers->addChild('triggers');
     foreach ($exported_trackers as $tracker) {
         $this->trigger_rules_manager->exportToXml($triggers_xml, $xml_field_mapping, $tracker);
     }
     try {
         $this->rng_validator->validate($xml_trackers, dirname(TRACKER_BASE_DIR) . '/www/resources/trackers.rng');
         return $xml_trackers;
     } catch (XML_ParseException $exception) {
         foreach ($exception->getErrors() as $parse_error) {
             fwrite(STDERR, $parse_error . PHP_EOL);
         }
     }
 }
开发者ID:ndjido,项目名称:tuleap,代码行数:26,代码来源:TrackerXmlExport.class.php

示例2: 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

示例3: process

 /**
  * Process the system event
  *
  * @return Boolean
  */
 public function process()
 {
     try {
         $project_id = (int) $this->getRequiredParameter(0);
         if ($this->system_event_manager->isProjectReindexationAlreadyQueued($project_id)) {
             $this->done('Skipped duplicate event');
             $this->logger->debug("Skipped duplicate event for project {$project_id} : " . self::NAME);
             return true;
         }
         $trackers = $this->tracker_factory->getTrackersByGroupId($project_id);
         $this->actions->reIndexProjectArtifacts($trackers);
         $this->done();
         return true;
     } catch (Exception $e) {
         $this->error($e->getMessage());
     }
     return false;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:23,代码来源:SystemEvent_FULLTEXTSEARCH_TRACKER_REINDEX_PROJECT.class.php

示例4: getTrackerList

 /**
  * getTrackerList - returns an array of Tracker that belongs to the project identified by group_id
  *
  * @param string $session_key the session hash associated with the session opened by the person who calls the service
  * @param int $group_id the ID of the group we want to retrieve the list of trackers
  * @return array the array of SOAPTracker that belongs to the project identified by $group_id, or a soap fault if group_id does not match with a valid project.
  */
 public function getTrackerList($session_key, $group_id)
 {
     try {
         $current_user = $this->soap_request_validator->continueSession($session_key);
         $project = $this->getProjectById($group_id, 'getTrackerList');
         $this->checkUserCanAccessProject($current_user, $project);
         // The function getTrackersByGroupId returns all trackers,
         // even those the user is NOT allowed to view -> we will filter in trackerlist_to_soap
         $trackers = $this->tracker_factory->getTrackersByGroupId($group_id);
         return $this->trackerlist_to_soap($trackers, $current_user);
     } catch (Exception $e) {
         return new SoapFault((string) $e->getCode(), $e->getMessage());
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:21,代码来源:SOAPServer.class.php

示例5: getAvailablePlanningTrackers

 /**
  * Retrieve the project trackers that can be used as planning trackers.
  *
  * @param Planning $planning The planning for which we want to know the available trackers.
  *
  * @return Array of Tracker
  */
 public function getAvailablePlanningTrackers(PFUser $user, $group_id)
 {
     $potential_planning_trackers = $this->getPotentialPlanningTrackerIds($user, $group_id);
     if (count($potential_planning_trackers) > 0) {
         $existing_plannings = $this->getPlanningTrackerIdsByGroupId($group_id);
         $trackers = array();
         foreach ($potential_planning_trackers as $tracker_id) {
             if (!in_array($tracker_id, $existing_plannings)) {
                 $trackers[] = $this->tracker_factory->getTrackerById($tracker_id);
             }
         }
         return $trackers;
     } else {
         return array_values($this->tracker_factory->getTrackersByGroupId($group_id));
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:23,代码来源:PlanningFactory.class.php

示例6: getTrackers

 /**
  * @return array of Tracker
  */
 public function getTrackers(Tracker $tracker)
 {
     $trackers = $this->tracker_factory->getTrackersByGroupId($tracker->getGroupId());
     return array_diff($trackers, array($tracker));
 }
开发者ID:nterray,项目名称:tuleap,代码行数:8,代码来源:TrackerMappingFactory.class.php

示例7: getAvailableTrackers

 /**
  * @param int $group_id the project id the trackers to retrieve belong to
  * 
  * @return Array of Tracker
  */
 public function getAvailableTrackers($group_id)
 {
     return array_values($this->tracker_factory->getTrackersByGroupId($group_id));
 }
开发者ID:nterray,项目名称:tuleap,代码行数:9,代码来源:PlanningFactory.class.php


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