VTTaskManager
in package
Functionality to save and retrieve Tasks from the database.
Table of Contents
- createTask() : VTTask
- Create a new class instance.
- deleteTask() : mixed
- Delete task by id.
- getTasksForWorkflow() : array<string|int, mixed>
- Return tasks for workflow.
- retrieveTask() : VTTask
- Retrieve a task from the database.
- saveTask() : The
- Save the task into the database.
- taskName() : string
- Return task name.
- unserializeTask() : array<string|int, mixed>|bool
- Unserialize task string.
Methods
createTask()
Create a new class instance.
public
createTask(string $taskType, int $workflowId) : VTTask
Parameters
- $taskType : string
- $workflowId : int
Return values
VTTask —deleteTask()
Delete task by id.
public
deleteTask(int $taskId) : mixed
Parameters
- $taskId : int
Return values
mixed —getTasksForWorkflow()
Return tasks for workflow.
public
getTasksForWorkflow(int $workflowId[, bool $active = true ]) : array<string|int, mixed>
Parameters
- $workflowId : int
- $active : bool = true
Return values
array<string|int, mixed> —retrieveTask()
Retrieve a task from the database.
public
retrieveTask( $taskId) : VTTask
Parameters
Return values
VTTask —The retrieved task
saveTask()
Save the task into the database.
public
saveTask(VTTask $task) : The
When a new task is saved for the first time a field is added to it called id that stores the task id used in the database.
Parameters
- $task : VTTask
-
The task instance to save
Return values
The —id of the task
taskName()
Return task name.
public
static taskName(string $serializedTask) : string
Parameters
- $serializedTask : string
Return values
string —unserializeTask()
Unserialize task string.
public
unserializeTask(string $str) : array<string|int, mixed>|bool
Parameters
- $str : string