当前位置: 首页>>代码示例>>PHP>>正文


PHP Tracker_FormElementFactory::getUsedFields方法代码示例

本文整理汇总了PHP中Tracker_FormElementFactory::getUsedFields方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_FormElementFactory::getUsedFields方法的具体用法?PHP Tracker_FormElementFactory::getUsedFields怎么用?PHP Tracker_FormElementFactory::getUsedFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tracker_FormElementFactory的用法示例。


在下文中一共展示了Tracker_FormElementFactory::getUsedFields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getIndexedFields

 private function getIndexedFields(Tracker $tracker)
 {
     $indexed_fields = array();
     foreach ($this->formelement_factory->getUsedFields($tracker) as $field) {
         $indexed_fields[$field->getId()] = $field;
     }
     return $indexed_fields;
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:8,代码来源:ArtifactValidator.class.php

示例2: trackerHasOnlyTitleRequired

 private function trackerHasOnlyTitleRequired(Tracker $tracker, Tracker_Semantic_Title $semantic_title)
 {
     $used_fields = $this->form_element_factory->getUsedFields($tracker);
     foreach ($used_fields as $used_field) {
         if ($used_field->isRequired() && $used_field->getId() != $semantic_title->getFieldId()) {
             return false;
         }
     }
     return true;
 }
开发者ID:ndjido,项目名称:tuleap,代码行数:10,代码来源:KanbanAddInPlaceChecker.php

示例3: saveArtifactAfterNewChangeset

 /**
  * Should we move this method outside of changeset creation
  * so that we can remove the dependency on artifact factory
  * and enforce SRP ?
  */
 protected function saveArtifactAfterNewChangeset(Tracker_Artifact $artifact, array $fields_data, PFUser $submitter, Tracker_Artifact_Changeset $new_changeset, Tracker_Artifact_Changeset $previous_changeset = null)
 {
     if ($this->artifact_factory->save($artifact)) {
         $used_fields = $this->formelement_factory->getUsedFields($artifact->getTracker());
         foreach ($used_fields as $field) {
             $field->postSaveNewChangeset($artifact, $submitter, $new_changeset, $previous_changeset);
         }
         $artifact->getWorkflow()->after($fields_data, $new_changeset, $previous_changeset);
         return true;
     }
     return false;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:17,代码来源:ChangesetCreatorBase.class.php

示例4: validate

 /**
  * Validate the fields contained in $fields_data, and update $fields_data for invalid data
  * $fields_data is an array of [field_id] => field_data
  *
  * @param array $fields_data The field data
  *
  * @return boolean true if all fields are valid, false otherwise. This function update $field_data (set values to null if not valid)
  */
 public function validate(Tracker_Artifact $artifact, $fields_data)
 {
     $is_valid = true;
     $used_fields = $this->formelement_factory->getUsedFields($artifact->getTracker());
     foreach ($used_fields as $field) {
         $submitted_value = $this->getSubmittedValue($field, $fields_data);
         if ($this->canValidateField($artifact, $field)) {
             $is_valid = $this->validateField($artifact, $field, $submitted_value) && $is_valid;
         }
     }
     return $is_valid;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:20,代码来源:FieldsValidator.class.php

示例5: getTrackerFields

 /**
  * getTrackerFields - returns an array of TrackerFields used in the tracker tracker_id of the project identified by group_id
  *
  * @param string $session_key the session hash associated with the session opened by the person who calls the service
  * @param int $group_id the ID of the project
  * @param int $tracker_id the ID of the Tracker
  * @return array the array of SOAPTrackerFields used in the tracker $tracker_id in the project identified by $group_id,
  *          or a soap fault if tracker_id or group_id does not match with a valid project/tracker.
  */
 public function getTrackerFields($session_key, $group_id, $tracker_id)
 {
     try {
         $current_user = $this->soap_request_validator->continueSession($session_key);
         $project = $this->getProjectById($group_id, 'getTrackerFields');
         $this->checkUserCanAccessProject($current_user, $project);
         $tracker = $this->getTrackerById($group_id, $tracker_id, 'getTrackerFields');
         // The function getTrackerFields returns all tracker fields,
         // even those the user is NOT allowed to view -> we will filter in trackerlist_to_soap
         $tracker_fields = $this->formelement_factory->getUsedFields($tracker);
         return $this->trackerfields_to_soap($current_user, $tracker, $tracker_fields);
     } catch (Exception $e) {
         return new SoapFault((string) $e->getCode(), $e->getMessage());
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:24,代码来源:SOAPServer.class.php


注:本文中的Tracker_FormElementFactory::getUsedFields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。