Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezoperationhandler.php
Go to the documentation of this file.
1 <?php
17 class eZOperationHandler
18 {
27 static function moduleOperationInfo( $moduleName, $useTriggers = true )
28 {
29 if ( !isset( $GLOBALS['eZGlobalModuleOperationList'] ) )
30 {
31 $GLOBALS['eZGlobalModuleOperationList'] = array();
32 }
33 if ( isset( $GLOBALS['eZGlobalModuleOperationList'][$moduleName] ) )
34 {
35 return $GLOBALS['eZGlobalModuleOperationList'][$moduleName];
36 }
37 $moduleOperationInfo = new eZModuleOperationInfo( $moduleName, $useTriggers );
38 $moduleOperationInfo->loadDefinition();
39 return $GLOBALS['eZGlobalModuleOperationList'][$moduleName] = $moduleOperationInfo;
40 }
41
42 static function execute( $moduleName, $operationName, $operationParameters, $lastTriggerName = null, $useTriggers = true )
43 {
44 $moduleOperationInfo = eZOperationHandler::moduleOperationInfo( $moduleName, $useTriggers );
45 if ( !$moduleOperationInfo->isValid() )
46 {
47 eZDebug::writeError( "Cannot execute operation '$operationName' in module '$moduleName', no valid data", __METHOD__ );
48 return null;
49 }
50 return $moduleOperationInfo->execute( $operationName, $operationParameters, $lastTriggerName );
51 }
52
59 static public function operationIsAvailable( $name )
60 {
61 $operationList = array_unique(
62 eZINI::instance( 'workflow.ini' )->variable( 'OperationSettings', 'AvailableOperationList' )
63 );
64
65 return in_array( $name, $operationList ) || in_array( "before_{$name}", $operationList ) || in_array( "after_{$name}", $operationList );
66 }
67
68 }
69
70 ?>
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZModuleOperationInfo
The class eZModuleOperationInfo does.
Definition: ezmoduleoperationinfo.php:18
eZOperationHandler
The class eZOperationHandler does.
Definition: ezoperationhandler.php:18
eZOperationHandler\moduleOperationInfo
static moduleOperationInfo( $moduleName, $useTriggers=true)
Definition: ezoperationhandler.php:27
eZOperationHandler\operationIsAvailable
static operationIsAvailable( $name)
Definition: ezoperationhandler.php:59
eZOperationHandler\execute
static execute( $moduleName, $operationName, $operationParameters, $lastTriggerName=null, $useTriggers=true)
Definition: ezoperationhandler.php:42
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.