本文整理匯總了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);
}