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


PHP Tracker_ArtifactFactory::getArtifactById方法代碼示例

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


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

示例1: getArtifactsFromArtifactInfo

 private function getArtifactsFromArtifactInfo($artifacts_info)
 {
     $artifacts = array();
     foreach ($artifacts_info as $artifact_info) {
         $artifacts[] = $this->artifact_factory->getArtifactById($artifact_info['id']);
     }
     return $artifacts;
 }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:8,代碼來源:Sorter.class.php

示例2: getReference

 /**
  * @return mixed Tracker_Reference || null
  */
 public function getReference($keyword, $artifact_id)
 {
     $artifact = $this->artifact_factory->getArtifactById($artifact_id);
     if (!$artifact) {
         return null;
     }
     return $this->getTrackerReference($artifact, $keyword);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:11,代碼來源:ReferenceManager.class.php

示例3: linkArtifact

 private function linkArtifact(PFUser $current_user, Tracker_Artifact $new_artifact)
 {
     $artifact_link_id = $this->request->get('artifact-link-id');
     $source_artifact = $this->tracker_artifact_factory->getArtifactById($artifact_link_id);
     if (!$source_artifact) {
         return;
     }
     $source_artifact->linkArtifact($new_artifact->getId(), $current_user);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:9,代碼來源:CreateArtifactFromModal.class.php

示例4: getCardsPresenters

 protected function getCardsPresenters(array $artifact_ids)
 {
     $cards = array();
     foreach ($artifact_ids as $id) {
         $artifact = $this->artifact_factory->getArtifactById($id);
         $cards[] = $this->presenter_builder->getCardInCellPresenter($artifact, Cardwall_SwimlineTrackerRenderer::FAKE_SWIMLINE_ID_FOR_TRACKER_RENDERER);
     }
     return $cards;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:9,代碼來源:RendererBoardBuilder.class.php

示例5: getSourceArtifact

 private function getSourceArtifact()
 {
     $source_artifact = null;
     if ($this->request->get('func') == 'new-artifact-link') {
         $source_artifact = $this->artifact_factory->getArtifactById($this->request->get('id'));
     } elseif ($this->request->get('child_milestone')) {
         $source_artifact = $this->artifact_factory->getArtifactById($this->request->get('child_milestone'));
     }
     return $source_artifact;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:10,代碼來源:ArtifactParentsSelectorEventListener.class.php

示例6: exportChildren

 public function exportChildren(SimpleXMLElement $xml)
 {
     while ($artifact_id = $this->children_collector->pop()) {
         $artifact = $this->artifact_factory->getArtifactById($artifact_id);
         if (!$artifact) {
             continue;
         }
         $last_changeset = $artifact->getLastChangeset();
         $this->artifact_xml_updater->exportSnapshotWithoutComments($xml, $last_changeset);
         $index_last_artifact = count($xml->artifact) - 1;
         $this->file_xml_updater->update($xml->artifact[$index_last_artifact]);
     }
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:13,代碼來源:ChildrenXMLExporter.php

示例7: getMilestoneWithPlannedArtifacts

 /**
  * Loads the milestone matching the given planning and artifact ids.
  *
  * Also loads:
  *   - the planning this milestone belongs to
  *   - the planning tracker and the backlog trackers of this planning
  *   - the artifacts planned for this milestone
  *
  * Only objects that should be visible for the given user are loaded.
  *
  * @param User $user
  * @param Project $project
  * @param int $planning_id
  * @param int $artifact_id
  *
  * @return Planning_Milestone
  */
 public function getMilestoneWithPlannedArtifacts(User $user, Project $project, $planning_id, $artifact_id)
 {
     $planning = $this->planning_factory->getPlanningWithTrackers($planning_id);
     $artifact = $this->artifact_factory->getArtifactById($artifact_id);
     if ($artifact) {
         $planned_artifacts = $this->getPlannedArtifacts($user, $artifact);
         $this->removeSubMilestones($user, $artifact, $planned_artifacts);
         $milestone = new Planning_ArtifactMilestone($project, $planning, $artifact, $planned_artifacts);
         return $this->updateMilestoneContextualInfo($user, $milestone);
     } else {
         return new Planning_NoMilestone($project, $planning);
     }
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:30,代碼來源:MilestoneFactory.class.php

示例8: generateBacklogItems

    public function generateBacklogItems() {
        echo "Create backlog items\n";

        $user = $this->user_manager->getUserByUserName(self::ADMIN_USER_NAME);

        $this->createUserStory($user, 'Believe', '206');
        $this->createUserStory($user, 'Break Free', '205');
        $this->createUserStory($user, 'Hughhhhhhh', '205');
        $this->createUserStory($user, 'Kill you', '205');
        $this->createUserStory($user, 'Back', '205');
        $this->createUserStory($user, 'Forward', '205');

        $release = $this->tracker_artifact_factory->getArtifactById(self::RELEASE_ARTIFACT_ID);
        $release->linkArtifact(self::STORY_1_ARTIFACT_ID, $user);
        $release->linkArtifact(self::STORY_2_ARTIFACT_ID, $user);
        $release->linkArtifact(self::STORY_3_ARTIFACT_ID, $user);
        $release->linkArtifact(self::STORY_4_ARTIFACT_ID, $user);
        $release->linkArtifact(self::STORY_5_ARTIFACT_ID, $user);

        $sprint = $this->tracker_artifact_factory->getArtifactById(self::SPRINT_ARTIFACT_ID);
        $sprint->linkArtifact(self::STORY_1_ARTIFACT_ID, $user);
        $sprint->linkArtifact(self::STORY_2_ARTIFACT_ID, $user);

        return $this;
    }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:25,代碼來源:TestDataBuilder.php

示例9: getArtifact

 private function getArtifact($artifact_id)
 {
     $artifact = $this->artifact_factory->getArtifactById($artifact_id);
     if (!$artifact) {
         throw new Tracker_Artifact_MailGateway_RecipientArtifactDoesNotExistException();
     }
     return $artifact;
 }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:8,代碼來源:RecipientFactory.class.php

示例10: getCards

 /**
  * @return array
  */
 public function getCards(array $artifact_ids, Tracker_ArtifactFactory $artifact_factory)
 {
     $cards = array();
     foreach ($artifact_ids as $id) {
         $cards[] = new ArtifactNode($artifact_factory->getArtifactById($id));
     }
     return $cards;
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:11,代碼來源:ArtifactNodeTreeProvider.class.php

示例11: getArtifactByFileInfoId

 /**
  *
  * @param int $id
  *
  * @return Tracker_Artifact | null
  */
 public function getArtifactByFileInfoId($id)
 {
     $row = $this->dao->searchArtifactIdByFileInfoId($id)->getRow();
     if (!$row) {
         return;
     }
     return $this->artifact_factory->getArtifactById($row['artifact_id']);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:14,代碼來源:FileInfoFactory.class.php

示例12: getArtifact

 private function getArtifact($artifact_id)
 {
     $artifact = $this->artifact_factory->getArtifactById($artifact_id);
     if ($artifact) {
         return $artifact;
     }
     throw new CardControllerBuilderRequestIdException();
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:8,代碼來源:SingleCardBuilder.class.php

示例13: getArtifactById

 private function getArtifactById($artifact_id, $user, $method_name)
 {
     $artifact = $this->artifact_factory->getArtifactById($artifact_id);
     if (!$artifact) {
         throw new SoapFault(get_artifact_fault, 'Could Not Get Artifact', $method_name);
     }
     $this->checkUserCanViewArtifact($artifact, $user);
     return $artifact;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:9,代碼來源:SOAPServer.class.php

示例14: getBareMilestone

 /**
  * A Bare Milestone is a milestone with minimal information to display (ie. without planned artifacts).
  *
  * It would deserve a dedicated object but it's a bit complex to setup today due to
  * MilestoneController::getAlreadyPlannedArtifacts()
  *
  * Only objects that should be visible for the given user are loaded.
  *
  * @param PFUser $user
  * @param Project $project
  * @param Integer $planning_id
  * @param Integer $artifact_id
  *
  * @return Planning_Milestone
  * @throws Planning_NoPlanningsException
  */
 public function getBareMilestone(PFUser $user, Project $project, $planning_id, $artifact_id)
 {
     $planning = $this->planning_factory->getPlanning($planning_id);
     $artifact = $this->artifact_factory->getArtifactById($artifact_id);
     if ($artifact && $artifact->userCanView($user)) {
         return $this->getBareMilestoneByArtifactAndPlanning($user, $artifact, $planning);
     } else {
         return new Planning_NoMilestone($project, $planning);
     }
 }
開發者ID:ansarbek,項目名稱:tuleap,代碼行數:26,代碼來源:MilestoneFactory.class.php

示例15: getContextRepresentation

 private function getContextRepresentation()
 {
     $html = '';
     if (!is_null($this->context) && $this->context !== self::NO_CONTEXT) {
         $html .= ' ' . $GLOBALS['Language']->getText('plugin_tracker_include_artifact', 'priority_change_in') . ' ';
         if ($this->context === '0') {
             $html .= $GLOBALS['Language']->getText('plugin_tracker_include_artifact', 'priority_change_backlog');
         } else {
             $html .= $this->tracker_artifact_factory->getArtifactById($this->context)->fetchColoredXRef();
         }
         $html .= ' ';
     }
     return $html;
 }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:14,代碼來源:Tracker_Artifact_PriorityHistoryChange.class.php


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