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


PHP Tracker_FormElementFactory::getFormElementByName方法代碼示例

本文整理匯總了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;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:16,代碼來源:Tracker_Report_SOAP.class.php

示例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
        );
    }
開發者ID:rinodung,項目名稱:tuleap,代碼行數:14,代碼來源:TestDataBuilder.php

示例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;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:16,代碼來源:Tracker_Report_REST.class.php

示例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);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:PlanningFactory.class.php


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