Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class WorkflowUtil

Class: WorkflowUtil

Source Location: /pnobjlib/WorkflowUtil.class.php

Class Overview


WorkflowUtil Class From a developers standpoint, we only use this class to address workflows as the rest is for internal use by the workflow engine.

Methods


Inherited Variables

Inherited Methods


Class Details

[line 20] WorkflowUtil Class From a developers standpoint, we only use this class to address workflows as the rest is for internal use by the workflow engine.



[ Top ]

Class Methods


method deleteWorkflow [line 209]

bool deleteWorkflow( array $obj)

delete a workflow and associated data (by magic)





Parameters:

array   $obj  

[ Top ]

method deleteWorkflowsForModule [line 188]

bool deleteWorkflowsForModule( string $module)

delete workflows for module (used module uninstall time)





Parameters:

string   $module  

[ Top ]

method executeAction [line 150]

mixed executeAction( string $schema, &$obj, string $actionID, [string $table = null], [string $module = null], [ $idcolumn = 'id'], array $obj, int $id)

Execute action





Parameters:

string   $schema   name of workflow schema
array   $obj   data object
string   $actionID   action to perform
string   $table   table where data will be stored (default = null)
string   $module   name of module (defaults calling module)
int   $id   ID column of table
   &$obj  
   $idcolumn  

[ Top ]

method getActionsByState [line 230]

mixed getActionsByState( string $schemaName, [string $module = null], [string $state = 'initial'], [array $obj = array()])

get Actions by State



Tags:

return:  array or bool false


Parameters:

string   $schemaName  
string   $module  
string   $state   default = 'initial'
array   $obj  

[ Top ]

method getActionsForObject [line 264]

mixed getActionsForObject( &$obj, string $dbTable, [mixed $idcolumn = 'id'], [string $module = null], array $obj)

get possible actions for a given item of data in it's current workflow state



Tags:

return:  array of actions or bool false


Parameters:

array   $obj  
string   $dbTable  
mixed   $idcolumn   id field default = 'id'
string   $module   module name (defaults to current module)
   &$obj  

[ Top ]

method getWorkflowForObject [line 297]

bool getWorkflowForObject( &$obj, string $dbTable, [ $idcolumn = 'id'], [string $module = null], array $obj, string $id)

Load workflow for object will attach array '__PNWORKFLOW__' to the object





Parameters:

array   $obj  
string   $dbTable   name of table where object is or will be stored
string   $id   name of ID column of object
string   $module   module name (defaults to current module)
   &$obj  
   $idcolumn  

[ Top ]

method getWorkflowState [line 347]

mixed getWorkflowState( &$obj, string $table, [string $idcolumn = 'id'], [string $module = null], array $obj)

get workflow state of object



Tags:

return:  string workflow state name or false


Parameters:

array   $obj  
string   $table  
string   $idcolumn   name of ID column
string   $module   module name (defaults to current module)
   &$obj  

[ Top ]

method loadSchema [line 30]

mixed loadSchema( [string $schema = 'standard'], [string $module = null])

load xml workflow



Tags:

return:  string of XML, or false


Parameters:

string   $schema   name of workflow scheme
string   $module   name of module

[ Top ]

method permissionCheck [line 374]

bool permissionCheck( string $module, string $schema, [array $obj = array()], int $permLevel, [int $actionId = null])

Check permission of action





Parameters:

string   $module  
string   $schema  
array   $obj  
int   $permLevel  
int   $actionId  

[ Top ]

method translatePermission [line 420]

mixed translatePermission( string $permission)

translates workflow permission to pn permission define



Tags:

return:  int or false


Parameters:

string   $permission  

[ Top ]

Packages:

Files:

Classes: