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


PHP Tracker_Artifact::getTracker方法代碼示例

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


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

示例1: getErrorMessage

 public function getErrorMessage()
 {
     $backlog_item_name = $this->artifact->getTitle();
     $tracker_name = $this->artifact->getTracker()->getName();
     $uri = $this->artifact->getUri();
     return $GLOBALS['Language']->getText('plugin_cardwall', 'cells_not_displayed', array($backlog_item_name, $tracker_name, $uri));
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:SwimlineSoloNoMatchingColumns.class.php

示例2: __construct

 public function __construct(Tracker_Artifact $artifact)
 {
     $this->id = $artifact->getId();
     $this->title = $artifact->getTitle();
     $this->url = $artifact->getUri();
     $this->artifact = $artifact;
     $this->color = $this->artifact->getTracker()->getColor();
     $this->type = $this->artifact->getTracker()->getName();
     $this->short_type = $this->artifact->getTracker()->getItemName();
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:10,代碼來源:BacklogItem.class.php

示例3: __construct

 public function __construct(Tracker_Artifact $artifact, $redirect_to_self)
 {
     $this->id = $artifact->getId();
     $this->title = $artifact->getTitle();
     $this->url = $artifact->getUri();
     $this->redirect_to_self = $redirect_to_self;
     $this->artifact = $artifact;
     $this->type = $this->artifact->getTracker()->getName();
     $this->color = $this->artifact->getTracker()->getColor();
 }
開發者ID:ansarbek,項目名稱:tuleap,代碼行數:10,代碼來源:BacklogItemPresenter.class.php

示例4: displayTrackerSwitcher

 private function displayTrackerSwitcher(PFUser $current_user)
 {
     $project = null;
     if ($this->source_artifact) {
         $project = $this->source_artifact->getTracker()->getProject();
         $GLOBALS['Response']->addFeedback('warning', $GLOBALS['Language']->getText('plugin_tracker', 'linked_to', array($this->source_artifact->fetchDirectLinkToArtifact(), $this->tracker_switcher->fetchTrackerSwitcher($current_user, ' ', $project, $this->tracker))), CODENDI_PURIFIER_DISABLED);
     } else {
         $GLOBALS['Response']->addFeedback('error', 'Error the artifact to link doesn\'t exist');
     }
     $GLOBALS['Response']->displayFeedback();
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:11,代碼來源:SubmitOverlayRenderer.class.php

示例5: process

 public function process(Tracker_Artifact $artifact, array $fields_data)
 {
     $tracker_data = array();
     //only when a previous changeset exists
     if (!$artifact->getLastChangeset() instanceof Tracker_Artifact_Changeset_Null) {
         foreach ($artifact->getLastChangeset()->getValues() as $key => $field) {
             if ($field instanceof Tracker_Artifact_ChangesetValue_Date || $field instanceof Tracker_Artifact_ChangesetValue_List) {
                 $tracker_data[$key] = $field->getValue();
             }
         }
     }
     //replace where appropriate with submitted values
     foreach ($fields_data as $key => $value) {
         $tracker_data[$key] = $value;
     }
     //addlastUpdateDate and submitted on if available
     foreach ($this->formelement_factory->getAllFormElementsForTracker($artifact->getTracker()) as $field) {
         if ($field instanceof Tracker_FormElement_Field_LastUpdateDate) {
             $tracker_data[$field->getId()] = date("Y-m-d");
         }
         if ($field instanceof Tracker_FormElement_Field_SubmittedOn) {
             $tracker_data[$field->getId()] = $artifact->getSubmittedOn();
         }
         if ($field instanceof Tracker_FormElement_Field_Date && !array_key_exists($field->getId(), $tracker_data)) {
             //user doesn't have access to field
             $tracker_data[$field->getId()] = $field->getValue($field->getId());
         }
     }
     return $tracker_data;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:30,代碼來源:ChangesetDataInitializator.class.php

示例6: getSubChildrenBelongingToTracker

 private function getSubChildrenBelongingToTracker(Tracker_Artifact $source_artifact, Tracker $expected_tracker, User $user)
 {
     $hierarchy = $this->getParentTrackersAndStopAtGivenTracker($expected_tracker, $source_artifact->getTracker());
     if ($hierarchy) {
         return $this->recursivelyFindChildrenBelongingToTracker($source_artifact, $expected_tracker, $user, $hierarchy);
     }
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:7,代碼來源:SubChildrenBelongingToTrackerCommand.class.php

示例7: artifactMatchTriggerValue

 private function artifactMatchTriggerValue(Tracker_Artifact $sibling, Tracker_Workflow_Trigger_FieldValue $trigger)
 {
     if ($trigger->getField()->getTracker() == $sibling->getTracker()) {
         return $trigger->isSetForArtifact($sibling);
     }
     return true;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:AllOfStrategy.class.php

示例8: storeFieldsValues

 private function storeFieldsValues(Tracker_Artifact $artifact, array $fields_data, PFUser $submitter, $changeset_id)
 {
     $used_fields = $this->formelement_factory->getUsedFields($artifact->getTracker());
     foreach ($used_fields as $field) {
         $this->saveNewChangesetForField($field, $artifact, $fields_data, $submitter, $changeset_id);
     }
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:InitialChangesetCreatorBase.class.php

示例9: getField

 public function getField(Tracker_Artifact $artifact)
 {
     $mapping = $this->config->getMappingFor($artifact->getTracker());
     if ($mapping) {
         return $mapping->getField();
     }
     return $this->semantic_status_provider->getField($artifact);
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:8,代碼來源:MappedFieldProvider.class.php

示例10: getFields

 /**
  *
  * @param Tracker_Artifact $artifact
  *
  * @return Tracker_FormElement_Field[]
  */
 public function getFields(Tracker_Artifact $artifact)
 {
     $diplayed_fields = array();
     $tracker = $artifact->getTracker();
     foreach ($this->getDisplayedFields($tracker) as $field) {
         $diplayed_fields[] = $field;
     }
     return $diplayed_fields;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:15,代碼來源:CardFields.class.php

示例11: getAugmentedDataFromRequest

 private function getAugmentedDataFromRequest(Codendi_Request $request)
 {
     //this handles the 100 value on multi-select boxes
     $fields_data = $request->get('artifact');
     $fields_data['request_method_called'] = 'artifact-update';
     $this->artifact->getTracker()->augmentDataFromRequest($fields_data);
     unset($fields_data['request_method_called']);
     return $fields_data;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:9,代碼來源:EditInPlaceRenderer.class.php

示例12: setItemTitle

 private function setItemTitle(Tracker_Artifact $artifact)
 {
     $title = $artifact->getTitle();
     $xref = $artifact->getXRef();
     $class = $artifact->getTracker()->getColor();
     $this->item_title = $title;
     $this->item_class = $class;
     $this->item_xref = $xref;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:9,代碼來源:SearchResultTracker.class.php

示例13: getParentInSameHierarchy

 private function getParentInSameHierarchy(Tracker $expected_parent_tracker, Tracker_Artifact $source_artifact, User $user)
 {
     if ($source_artifact->getTracker() == $expected_parent_tracker) {
         return $source_artifact;
     } else {
         $parent = $source_artifact->getParent($user);
         if ($parent) {
             return $this->getParentInSameHierarchy($expected_parent_tracker, $parent, $user);
         }
     }
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:11,代碼來源:ParentInSameHierarchyCommand.class.php

示例14: getAssigneeIds

 private function getAssigneeIds(Tracker_Artifact $artifact)
 {
     $contributor_field = $artifact->getTracker()->getContributorField();
     if ($contributor_field) {
         $assignee = $artifact->getValue($contributor_field);
         if ($assignee) {
             return $assignee->getValue();
         }
     }
     return array();
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:11,代碼來源:PermissionRetrieveAssignee.class.php

示例15: getFieldsDataOnUpdate

 /**
  * @param ArtifactValuesRepresentation[] $values
  * @param Tracker_Artifact               $artifact
  */
 public function getFieldsDataOnUpdate(array $values, Tracker_Artifact $artifact)
 {
     $new_values = array();
     $indexed_fields = $this->getIndexedFields($artifact->getTracker());
     foreach ($values as $value) {
         $array_representation = $value->toArray();
         $field = $this->getField($indexed_fields, $array_representation);
         $new_values[$field->getId()] = $field->getFieldDataFromRESTValue($array_representation, $artifact);
     }
     return $new_values;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:15,代碼來源:ArtifactValidator.class.php


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