SeedDMS_Core_Workflow_State
in package
Class to represent a workflow state in the document management system
Tags
Table of Contents
Properties
- $_dms : SeedDMS_Core_DMS
- $_documentstatus : int
- $_id : int
- $_maxtime : int
- $_name : string
- $_precondfunc : int
Methods
- __construct() : mixed
- SeedDMS_Core_Workflow_State constructor.
- getDocumentStatus() : int
- Get the document status which is set when this state is reached
- getID() : int
- getMaxTime() : int
- getName() : string
- getPreCondFunc() : int
- getTransitions() : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
- Return workflow transitions the status is being used in
- isUsed() : bool
- Check if workflow state is currently used by any workflow transition
- remove() : bool
- Remove the workflow state
- setDMS() : mixed
- setDocumentStatus() : bool
- setMaxTime() : bool
- setName() : bool
- setPreCondFunc() : bool
Properties
$_dms
public
SeedDMS_Core_DMS
$_dms
reference to the dms instance this attribute belongs to
Tags
$_documentstatus
public
int
$_documentstatus
matching documentstatus when this state is reached
Tags
$_id
public
int
$_id
id of workflow state
Tags
$_maxtime
public
int
$_maxtime
maximum of seconds allowed in this state
Tags
$_name
public
string
$_name
name of the workflow state
Tags
$_precondfunc
public
int
$_precondfunc
maximum of seconds allowed in this state
Tags
Methods
__construct()
SeedDMS_Core_Workflow_State constructor.
public
__construct( $id, $name, $maxtime, $precondfunc, $documentstatus) : mixed
Parameters
getDocumentStatus()
Get the document status which is set when this state is reached
public
getDocumentStatus() : int
The document status uses the define states S_REJECTED and S_RELEASED Only those two states will update the document status
Return values
int —document status
getID()
public
getID() : int
Return values
intgetMaxTime()
public
getMaxTime() : int
Return values
int —maximum
getName()
public
getName() : string
Return values
stringgetPreCondFunc()
public
getPreCondFunc() : int
Return values
int —maximum
getTransitions()
Return workflow transitions the status is being used in
public
getTransitions() : array<string|int, SeedDMS_Core_Workflow_Transition>|bool
Return values
array<string|int, SeedDMS_Core_Workflow_Transition>|bool —array of workflow transitions or false in case of an error
isUsed()
Check if workflow state is currently used by any workflow transition
public
isUsed() : bool
Return values
bool —true if workflow is used, otherwise false
remove()
Remove the workflow state
public
remove() : bool
Return values
bool —true on success or false in case of an error false is also returned if the workflow state is currently in use
setDMS()
public
setDMS( $dms) : mixed
Parameters
setDocumentStatus()
public
setDocumentStatus( $docstatus) : bool
Parameters
Return values
boolsetMaxTime()
public
setMaxTime( $maxtime) : bool
Parameters
Return values
boolsetName()
public
setName(string $newName) : bool
Parameters
- $newName : string
Return values
boolsetPreCondFunc()
public
setPreCondFunc( $precondfunc) : bool