本文整理汇总了PHP中Tracker_FormElementFactory::getFormElementByName方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_FormElementFactory::getFormElementByName方法的具体用法?PHP Tracker_FormElementFactory::getFormElementByName怎么用?PHP Tracker_FormElementFactory::getFormElementByName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker_FormElementFactory
的用法示例。
在下文中一共展示了Tracker_FormElementFactory::getFormElementByName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCriteria
public function getCriteria()
{
$rank = 0;
foreach ($this->soap_criteria as $key => $value) {
$is_advanced = false;
if ($formelement = $this->formelement_factory->getFormElementByName($this->getTracker()->getId(), $value->field_name)) {
if ($formelement->userCanRead($this->current_user)) {
$criteria = new Tracker_Report_Criteria(0, $this, $formelement, $rank, $is_advanced);
$formelement->setCriteriaValueFromSOAP($criteria, $value->value);
$this->criteria[$formelement->getId()] = $criteria;
$rank++;
}
}
}
return $this->criteria;
}
示例2: createUserStory
private function createUserStory(PFUser $user, $field_i_want_to_value, $field_status_value) {
$fields_data = array(
$this->tracker_formelement_factory->getFormElementByName(self::USER_STORIES_TRACKER_ID, 'i_want_to')->getId() => $field_i_want_to_value,
$this->tracker_formelement_factory->getFormElementByName(self::USER_STORIES_TRACKER_ID, 'status')->getId() => $field_status_value
);
$this->tracker_artifact_factory->createArtifact(
$this->tracker_factory->getTrackerById(self::USER_STORIES_TRACKER_ID),
$fields_data,
$user,
'',
false
);
}
示例3: getCriteria
public function getCriteria()
{
$rank = 0;
$tracker_id = $this->getTracker()->getId();
foreach ($this->rest_criteria as $field_identifier => $criterion) {
$formelement = $this->formelement_factory->getFormElementById($field_identifier);
if (!$formelement) {
$formelement = $this->formelement_factory->getFormElementByName($tracker_id, $field_identifier);
}
if ($formelement && $formelement->userCanRead($this->current_user)) {
$this->addCriterionToFormElement($formelement, $criterion, $rank);
$rank++;
}
}
return $this->criteria;
}
示例4: getPlanningTrackerDurationField
/**
* @return Tracker_FormElement_Field | null
*/
private function getPlanningTrackerDurationField(Tracker $planning_tracker)
{
return $this->form_element_factory->getFormElementByName($planning_tracker->getId(), Planning_Milestone::DURATION_FIELD_NAME);
}