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


PHP Tracker_Artifact::getLinkedArtifacts方法代碼示例

本文整理匯總了PHP中Tracker_Artifact::getLinkedArtifacts方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker_Artifact::getLinkedArtifacts方法的具體用法?PHP Tracker_Artifact::getLinkedArtifacts怎麽用?PHP Tracker_Artifact::getLinkedArtifacts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tracker_Artifact的用法示例。


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

示例1: fetchArtifactLinks

 /**
  * @param PFUser $current_user
  * @return Tracker_Artifact_Presenter_ArtifactLinkPresenter[]
  */
 private function fetchArtifactLinks(PFUser $current_user)
 {
     $linked_artifacts = $this->artifact->getLinkedArtifacts($current_user);
     $links = array();
     foreach ($linked_artifacts as $artifact) {
         $artifact_title = $artifact->getTitle();
         $artifact_link = new Tracker_Artifact_Presenter_ArtifactLinkPresenter($artifact->getTracker()->getItemName(), $artifact->getTracker()->getProject()->getID(), $artifact->getId(), $artifact_title ? $artifact_title : '');
         $links[] = $artifact_link;
     }
     return $links;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:15,代碼來源:EditInPlaceRenderer.class.php

示例2: getComputedValue

 /**
  * Given an artifact, return a numerical value of the field for this artifact.
  *
  * @param User             $user                  The user who see the results
  * @param Tracker_Artifact $artifact              The artifact on which the value is computed
  * @param Array            $computed_artifact_ids Hash map to store artifacts already computed (avoid cycles)
  *
  * @return float
  */
 public function getComputedValue(User $user, Tracker_Artifact $artifact, $timestamp = null, &$computed_artifact_ids = array())
 {
     $sum = null;
     foreach ($artifact->getLinkedArtifacts($user) as $linked_artifact) {
         $value = $this->getUniqueFieldValue($user, $linked_artifact, $timestamp, $computed_artifact_ids);
         $sum = $this->sumIfNotNull($sum, $value);
     }
     return $sum;
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:18,代碼來源:Tracker_FormElement_Field_Computed.class.php

示例3: isParentLinkedToParentMilestone

 private function isParentLinkedToParentMilestone(Tracker_Artifact $artifact_added, Tracker_Artifact $parent_milestone_artifact, PFUser $user)
 {
     $parent = $artifact_added->getParent($user);
     if (!$parent) {
         return false;
     }
     $linked_artifacts = $parent_milestone_artifact->getLinkedArtifacts($user);
     foreach ($linked_artifacts as $linked_artifact) {
         if ($linked_artifact->getId() === $parent->getId()) {
             return true;
         }
     }
     return false;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:14,代碼來源:MilestoneParentLinker.php

示例4: getLinkedArtifacts

 /**
  * Returns linked artifacts
  * 
  * @param Tracker_Artifact $artifact
  * 
  * @return Array of Tracker_Artifact
  * 
  * @throws Exception 
  */
 private function getLinkedArtifacts(Tracker_Artifact $artifact, User $user)
 {
     $linked_artifacts = $artifact->getLinkedArtifacts($user);
     if (count($linked_artifacts)) {
         return $linked_artifacts;
     }
     throw new Tracker_FormElement_Field_BurndownException('burndown_no_linked_artifacts');
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:17,代碼來源:Tracker_FormElement_Field_Burndown.class.php

示例5: getLinkedArtifacts

 /**
  * Returns linked artifacts
  *
  * @param Tracker_Artifact $artifact
  *
  * @return Array of Tracker_Artifact
  *
  * @throws Tracker_FormElement_Field_BurndownException
  */
 private function getLinkedArtifacts(Tracker_Artifact $artifact, PFUser $user)
 {
     $linked_artifacts = $artifact->getLinkedArtifacts($user);
     if (count($linked_artifacts)) {
         return $linked_artifacts;
     }
     throw new Tracker_FormElement_Field_BurndownException($GLOBALS['Language']->getText('plugin_tracker', 'burndown_no_linked_artifacts'));
 }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:17,代碼來源:Tracker_FormElement_Field_Burndown.class.php


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