当前位置: 首页>>代码示例>>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;未经允许,请勿转载。