本文整理汇总了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));
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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();
}
示例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;
}