本文整理汇总了PHP中Tracker_Artifact::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_Artifact::getValue方法的具体用法?PHP Tracker_Artifact::getValue怎么用?PHP Tracker_Artifact::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker_Artifact
的用法示例。
在下文中一共展示了Tracker_Artifact::getValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCurrentComputedValue
/**
* @param User $user
* @param Tracker_Artifact $artifact
*
* @return mixed
*/
private function getCurrentComputedValue(Tracker_Artifact $artifact)
{
$value = $artifact->getValue($this);
if ($value) {
return $value->getValue();
}
return null;
}
示例2: isSetForArtifact
/**
* Return true if given artifact has the same value than current object
*
* @param Tracker_Artifact $artifact
* @return boolean
*/
public function isSetForArtifact(Tracker_Artifact $artifact)
{
$artifact_value = $artifact->getValue($this->getField());
if ($artifact_value && $artifact_value->getValue() == array($this->getValue()->getId())) {
return true;
}
return false;
}
示例3: 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();
}
示例4: testGetValue
function testGetValue()
{
$changeset = new MockTracker_Artifact_Changeset();
$field = new MockTracker_FormElement_Field_Date();
$value = new MockTracker_Artifact_ChangesetValue_Date();
$changeset->setReturnReference('getValue', $value);
$id = $tracker_id = $use_artifact_permissions = $submitted_by = $submitted_on = '';
$artifact = new Tracker_Artifact($id, $tracker_id, $submitted_by, $submitted_on, $use_artifact_permissions);
$this->assertEqual($artifact->getValue($field, $changeset), $value);
}
示例5: getLastChangesetValue
/**
* Get the last ChangesetValue of the field
*
* @param Tracker_Artifact
*
* @return Tracker_Artifact_ChangesetValue
*/
public function getLastChangesetValue(Tracker_Artifact $artifact)
{
return $artifact->getValue($this);
}
示例6: getCurrentValue
private function getCurrentValue(Tracker_Artifact $artifact)
{
$changeset_value = $artifact->getValue($this);
if ($changeset_value) {
$values = $this->getBind()->getNumericValues($changeset_value);
if (!empty($values)) {
return $values[0];
}
}
return null;
}
示例7: getCapacity
/**
* @param Tracker_Artifact $artifact
*
* @return null|int
*/
public function getCapacity(Tracker_Artifact $artifact)
{
$field = $this->getCapacityField();
if (!$field) {
return null;
}
$changeset_value = $artifact->getValue($field);
if (!$changeset_value) {
return 0;
}
return $changeset_value->getValue();
}