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


PHP eZWorkflowProcess::fetch方法代码示例

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


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

示例1: continueWorkflow

 static function continueWorkflow($workflowProcessID)
 {
     $operationResult = null;
     $theProcess = eZWorkflowProcess::fetch($workflowProcessID);
     if ($theProcess != null) {
         //restore memento and run it
         $bodyMemento = eZOperationMemento::fetchChild($theProcess->attribute('memento_key'));
         if ($bodyMemento === null) {
             eZDebug::writeError($bodyMemento, "Empty body memento in workflow.php");
             return $operationResult;
         }
         $bodyMementoData = $bodyMemento->data();
         $mainMemento = $bodyMemento->attribute('main_memento');
         if (!$mainMemento) {
             return $operationResult;
         }
         $mementoData = $bodyMemento->data();
         $mainMementoData = $mainMemento->data();
         $mementoData['main_memento'] = $mainMemento;
         $mementoData['skip_trigger'] = false;
         $mementoData['memento_key'] = $theProcess->attribute('memento_key');
         $bodyMemento->remove();
         $operationParameters = array();
         if (isset($mementoData['parameters'])) {
             $operationParameters = $mementoData['parameters'];
         }
         $operationResult = eZOperationHandler::execute($mementoData['module_name'], $mementoData['operation_name'], $operationParameters, $mementoData);
     }
     return $operationResult;
 }
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:30,代码来源:ezpaymentobject.php

示例2: time

<?php

/**
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
 * @license For full copyright and license information view LICENSE file distributed with this source code.
 * @version //autogentag//
 * @package kernel
 */
$Module = $Params['Module'];
$WorkflowProcessID = null;
if (!isset($Params["WorkflowProcessID"])) {
    $Module->redirectTo($Module->functionURI("list"));
    return;
}
$WorkflowProcessID = $Params["WorkflowProcessID"];
$process = eZWorkflowProcess::fetch($WorkflowProcessID);
if ($process === null) {
    $Module->redirectTo($Module->functionURI("list"));
    return;
}
$http = eZHTTPTool::instance();
if ($http->hasPostVariable("Reset")) {
    $process->reset();
    $process->setAttribute("modified", time());
    $process->store();
}
// Template handling
$tpl = eZTemplate::factory();
$workflow = eZWorkflow::fetch($process->attribute("workflow_id"));
$workflowEvent = false;
if ($process->attribute("event_id") != 0) {
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:31,代码来源:process.php

示例3: time

 #include_once( 'kernel/classes/ezcontentobjectversion.php' );
 $contentObjectVersion = $approveStatus->attribute('object_version');
 $contentObjectVersion->setAttribute('status', eZContentObjectVersion::STATUS_PENDING);
 $contentObjectVersion->sync();
 $approveStatus->setAttribute('approve_status', eZXApproveStatus::StatusInApproval);
 $approveStatus->store();
 $workflowProcess = $approveStatus->attribute('workflow_process');
 if (!$workflowProcess) {
     $approveStatus->remove();
     return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
 }
 $workflowProcess->setAttribute('status', eZWorkflow::STATUS_DEFERRED_TO_CRON);
 $workflowProcess->setAttribute('modified', time());
 $parameterList = $workflowProcess->attribute('parameter_list');
 if (isset($parameterList['parent_process_id'])) {
     $parentProcess = eZWorkflowProcess::fetch($parameterList['parent_process_id']);
     if (is_object($parentProcess)) {
         $parentProcess->setAttribute('status', eZWorkflow::STATUS_DEFERRED_TO_CRON);
         $parentProcess->setAttribute('modified', time());
         $parentProcess->store();
     }
 }
 $workflowProcess->store();
 $approveINI = eZINI::instance('ezapprove2.ini');
 if ($approveINI->variable('ApproveSettings', 'ObjectLockOnEdit') == 'true') {
     // Lock all related objects for editing and removal
     $object = $approveStatus->attribute('contentobject');
     // #HACK#
     if ($object->attribute('contentclass_id') == 17) {
         foreach ($object->relatedContentObjectList($approveStatus->attribute('active_version'), false, false) as $relatedObject) {
             $relatedObject->setAttribute('flags', $relatedObject->attribute('flags') | EZ_CONTENT_OBJECT_FLAG_LOCK_EDIT | EZ_CONTENT_OBJECT_FLAG_LOCK_REMOVE);
开发者ID:brucem,项目名称:ezapprove2,代码行数:31,代码来源:select_approver.php

示例4: approve2Event

 function approve2Event()
 {
     #include_once( 'kernel/classes/ezworkflowprocess.php' );
     $workflowProcess = eZWorkflowProcess::fetch($this->attribute('workflowprocess_id'), false);
     $retVal = false;
     if (!$workflowProcess) {
         return $retVal;
     }
     #include_once( eZExtension::baseDirectory() . '/ezapprove2/eventtypes/event/ezxapprove2/ezxapprove2type.php' );
     $retVal = eZApprove2Event::fetch($workflowProcess['event_id']);
     return $retVal;
 }
开发者ID:brucem,项目名称:ezapprove2,代码行数:12,代码来源:ezxapprovestatus.php


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