本文整理汇总了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;
}
示例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) {
示例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);
示例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;
}