当前位置: 首页>>代码示例>>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;未经允许,请勿转载。