本文整理匯總了PHP中Tracker_ArtifactFactory::getArtifactsByTrackerId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker_ArtifactFactory::getArtifactsByTrackerId方法的具體用法?PHP Tracker_ArtifactFactory::getArtifactsByTrackerId怎麽用?PHP Tracker_ArtifactFactory::getArtifactsByTrackerId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tracker_ArtifactFactory
的用法示例。
在下文中一共展示了Tracker_ArtifactFactory::getArtifactsByTrackerId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: export
public function export(Tracker $tracker, SimpleXMLElement $xml_content, PFUser $user, ZipArchive $archive)
{
$artifacts_node = $xml_content->addChild('artifacts');
$all_artifacts = $this->artifact_factory->getArtifactsByTrackerId($tracker->getId());
$this->checkThreshold(count($all_artifacts));
foreach ($all_artifacts as $artifact) {
$artifact->exportToXML($artifacts_node, $user, $archive);
}
$this->rng_validator->validate($artifacts_node, realpath(dirname(TRACKER_BASE_DIR) . self::ARTIFACTS_RNG_PATH));
}
示例2: getTopSubMilestoneArtifacts
private function getTopSubMilestoneArtifacts(PFUser $user, Planning_VirtualTopMilestone $top_milestone)
{
$artifacts = array();
if (!$top_milestone->getPlanning()) {
return $artifacts;
}
$milestone_planning_tracker_id = $top_milestone->getPlanning()->getPlanningTrackerId();
if (!$milestone_planning_tracker_id) {
return $artifacts;
}
return $this->artifact_factory->getArtifactsByTrackerId($milestone_planning_tracker_id);
}
示例3: getTopSubMilestones
/**
* Return the list of top most milestones
*
* @param PFUser $user
* @param Planning_VirtualTopMilestone $top_milestone
*
* @return Planning_ArtifactMilestone[]
*/
private function getTopSubMilestones(PFUser $user, Planning_VirtualTopMilestone $top_milestone)
{
$milestones = array();
if (!$top_milestone->getPlanning()) {
return $milestones;
}
$root_planning = $this->planning_factory->getRootPlanning($user, $top_milestone->getProject()->getID());
$milestone_planning_tracker_id = $top_milestone->getPlanning()->getPlanningTrackerId();
$artifacts = $this->artifact_factory->getArtifactsByTrackerId($milestone_planning_tracker_id);
if ($milestone_planning_tracker_id) {
foreach ($artifacts as $artifact) {
if ($artifact->getLastChangeset() && $artifact->userCanView($user)) {
$milestone = new Planning_ArtifactMilestone($top_milestone->getProject(), $root_planning, $artifact);
$this->addMilestoneAncestors($user, $milestone);
$this->updateMilestoneContextualInfo($user, $milestone);
$milestones[] = $milestone;
}
}
}
return $milestones;
}