Settings_Workflows_Module_Model
extends Settings_Vtiger_Module_Model
in package
Class settings workflows module model.
Table of Contents
- $allFields : array<string|int, mixed>
- All fields list.
- $baseIndex : string
- Base table index column name.
- $baseTable : string
- Base table name.
- $listFields : array<string|int, mixed>
- Fields visible on list view array.
- $name : string
- Module name.
- $triggerTypes : array<string|int, mixed>
- Workflow triggers list.
- checkPathForImportMethod() : bool
- Check the path for importing the method.
- deleteForModule() : mixed
- Delete all worklflows associated with module.
- exportTaskMethod() : array<string|int, mixed>
- Returns infor for exporting of task method.
- getCreateRecordUrl() : string
- Get create new record url.
- getCreateViewUrl() : string
- Function to get the url for create view of the module.
- getDefaultUrl() : string
- Function to get the url for default view of the module.
- getExpressions() : array<string|int, mixed>
- Get expressions list.
- getImportViewUrl() : string
- Returns url for import view.
- getListFields() : array<string|int, mixed>
- {@inheritdoc}
- getSupportedModules() : array<string|int, mixed>
- Get supported modules list.
- getTriggerTypes() : array<string|int, mixed>
- Get supported triggers list.
- getWorkflowActionsForModule() : array<string|int, mixed>
- Get workflow actions for module.
- importTaskMethod() : mixed
- Function that creates task method.
- importWorkflow() : int
- Imports workflow template xml file.
- updateActionsSequence() : void
- Update actions sequence.
- updateTasksSequence() : void
- Update tasks sequence.
Properties
$allFields
All fields list.
public
static array<string|int, mixed>
$allFields
= ['module_name', 'summary', 'conditions', 'execution_condition', 'filtersavedinnew', 'defaultworkflow', 'type', 'schtypeid', 'schdayofmonth', 'schdayofweek', 'schannualdates', 'schtime', 'nexttrigger_time']
$baseIndex
Base table index column name.
public
string
$baseIndex
= 'workflow_id'
$baseTable
Base table name.
public
string
$baseTable
= 'com_vtiger_workflows'
$listFields
Fields visible on list view array.
public
array<string|int, mixed>
$listFields
= ['summary' => 'Summary', 'module_name' => 'Module', 'execution_condition' => 'Execution Condition', 'all_tasks' => 'LBL_ALL_TASKS', 'active_tasks' => 'LBL_ACTIVE_TASKS']
$name
Module name.
public
string
$name
= 'Workflows'
$triggerTypes
Workflow triggers list.
public
static array<string|int, mixed>
$triggerTypes
= [1 => 'ON_FIRST_SAVE', 4 => 'ON_MODIFY', 3 => 'ON_EVERY_SAVE', 2 => 'ONCE', 5 => 'ON_DELETE', 6 => 'ON_SCHEDULE', 7 => 'MANUAL', 8 => 'TRIGGER', 9 => 'BLOCK_EDIT']
Methods
checkPathForImportMethod()
Check the path for importing the method.
public
checkPathForImportMethod(string $path) : bool
Parameters
- $path : string
Return values
bool —Returns true if success
deleteForModule()
Delete all worklflows associated with module.
public
static deleteForModule(ModuleBasic $moduleInstance) : mixed
Parameters
- $moduleInstance : ModuleBasic
Return values
mixed —exportTaskMethod()
Returns infor for exporting of task method.
public
static exportTaskMethod(int $methodName) : array<string|int, mixed>
Parameters
- $methodName : int
-
name of method
Return values
array<string|int, mixed> —task method data
getCreateRecordUrl()
Get create new record url.
public
static getCreateRecordUrl() : string
Return values
string —getCreateViewUrl()
Function to get the url for create view of the module.
public
static getCreateViewUrl() : string
Return values
string —- url
getDefaultUrl()
Function to get the url for default view of the module.
public
static getDefaultUrl() : string
Return values
string —- url
getExpressions()
Get expressions list.
public
static getExpressions() : array<string|int, mixed>
Return values
array<string|int, mixed> —getImportViewUrl()
Returns url for import view.
public
static getImportViewUrl() : string
Return values
string —url
getListFields()
{@inheritdoc}
public
getListFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —getSupportedModules()
Get supported modules list.
public
static getSupportedModules() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTriggerTypes()
Get supported triggers list.
public
static getTriggerTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —getWorkflowActionsForModule()
Get workflow actions for module.
public
static getWorkflowActionsForModule(string $moduleName) : array<string|int, mixed>
Parameters
- $moduleName : string
Return values
array<string|int, mixed> —importTaskMethod()
Function that creates task method.
public
importTaskMethod(array<string|int, mixed> &$method, array<string|int, mixed> &$messages) : mixed
Parameters
- $method : array<string|int, mixed>
-
array containing method data
- $messages : array<string|int, mixed>
-
array containing returned error messages
Return values
mixed —importWorkflow()
Imports workflow template xml file.
public
importWorkflow(array<string|int, mixed> $data) : int
Parameters
- $data : array<string|int, mixed>
Return values
int —workflow id
updateActionsSequence()
Update actions sequence.
public
static updateActionsSequence(int $wfIdToMove, int $workflowBeforeId, string $moduleName) : void
Parameters
- $wfIdToMove : int
- $workflowBeforeId : int
- $moduleName : string
Return values
void —updateTasksSequence()
Update tasks sequence.
public
static updateTasksSequence(array<string|int, mixed> $tasks) : void
Parameters
- $tasks : array<string|int, mixed>