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


PHP Tracker_Artifact::getWorkflow方法代碼示例

本文整理匯總了PHP中Tracker_Artifact::getWorkflow方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker_Artifact::getWorkflow方法的具體用法?PHP Tracker_Artifact::getWorkflow怎麽用?PHP Tracker_Artifact::getWorkflow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tracker_Artifact的用法示例。


在下文中一共展示了Tracker_Artifact::getWorkflow方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: saveNewChangesetForField

 /**
  * @see Tracker_Artifact_Changeset_NewChangesetCreatorBase::saveNewChangesetForField()
  */
 protected function saveNewChangesetForField(Tracker_FormElement_Field $field, Tracker_Artifact $artifact, $previous_changeset, array $fields_data, PFUser $submitter, $changeset_id)
 {
     $is_submission = false;
     $bypass_perms = true;
     $workflow = $artifact->getWorkflow();
     if ($this->isFieldSubmitted($field, $fields_data)) {
         if ($field->userCanUpdate()) {
             return $field->saveNewChangeset($artifact, $previous_changeset, $changeset_id, $fields_data[$field->getId()], $submitter, $is_submission);
         } else {
             if ($workflow && $workflow->bypassPermissions($field)) {
                 return $field->saveNewChangeset($artifact, $previous_changeset, $changeset_id, $fields_data[$field->getId()], $submitter, $is_submission, $bypass_perms);
             } else {
                 return $field->saveNewChangeset($artifact, $previous_changeset, $changeset_id, null, $submitter, $is_submission);
             }
         }
     } else {
         return $field->saveNewChangeset($artifact, $previous_changeset, $changeset_id, null, $submitter, $is_submission);
     }
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:22,代碼來源:NewChangesetCreator.class.php

示例2: saveNewChangesetForField

 /**
  * @see parent::saveNewChangesetForField()
  */
 protected function saveNewChangesetForField(Tracker_FormElement_Field $field, Tracker_Artifact $artifact, array $fields_data, PFUser $submitter, $changeset_id)
 {
     $is_submission = true;
     $bypass_perms = true;
     $workflow = $artifact->getWorkflow();
     if ($this->isFieldSubmitted($field, $fields_data)) {
         if ($field->userCanSubmit()) {
             $field->saveNewChangeset($artifact, null, $changeset_id, $fields_data[$field->getId()], $submitter, $is_submission);
         } else {
             if ($workflow && $workflow->bypassPermissions($field)) {
                 $field->saveNewChangeset($artifact, null, $changeset_id, $fields_data[$field->getId()], $submitter, $is_submission, $bypass_perms);
             }
         }
     } else {
         if (!$field->userCanSubmit() && $field->isSubmitable()) {
             $this->pushDefaultValueInSubmittedValues($field, $fields_data);
             $field->saveNewChangeset($artifact, null, $changeset_id, $fields_data[$field->getId()], $submitter, $is_submission, $bypass_perms);
         }
     }
 }
開發者ID:amanikamail,項目名稱:tuleap,代碼行數:23,代碼來源:InitialChangesetCreator.class.php

示例3: askWorkflowToUpdateTheRequestAndCheckGlobalRules

 private function askWorkflowToUpdateTheRequestAndCheckGlobalRules(Tracker_Artifact $artifact, array &$fields_data, PFUser $submitter)
 {
     $workflow = $artifact->getWorkflow();
     if ($workflow) {
         $workflow->before($fields_data, $submitter, $artifact);
         $augmented_data = $this->field_initializator->process($artifact, $fields_data);
         try {
             $workflow->checkGlobalRules($augmented_data, $this->formelement_factory);
         } catch (Tracker_Workflow_GlobalRulesViolationException $e) {
             return false;
         }
     }
     return true;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:14,代碼來源:InitialChangesetCreatorBase.class.php


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