Task
extends BaseContent
in package
Uses
TextAuthor
Define system task object
Tags
Table of Contents
- $ : int|null
- $db : CalendarDBAL|null
- $edb : EventDBAL|null
- $offsets : array<string|int, mixed>
- $parent : TaskProject|null
- $relation : Relation|null
- $root : string
- root storage folder starting at %DATA%/folder/
- $service : Service|null
- The cached linked service
- __construct() : mixed
- Task constructor.
- Assignment() : array<string|int, mixed>|null
- Attachments() : array<string|int, mixed>|null
- Get/Set list of attached files
- Author() : User|null
- Get the original author of the task
- ChangeEmployeeAssignment() : Result
- Change assignments of employee in this task
- Comments() : array<string|int, mixed>|mixed
- Get list of comments
- Delete() : Result|null
- Delete this task and update the related service
- Employees() : array<string|int, mixed>
- List employee attribute array
- EmployeesResolved() : array<string|int, mixed>
- Resolved list of employees
- EmployeeTimeLimit() : int
- Get time limit of certain employee
- GeneralSearchFields() : array<string|int, mixed>
- Get the default search fields
- RelatedService() : Service|null
- Get linked service
- Relation() : Relation|null
- Get/Set relation of task
- Resources() : array<string|int, mixed>
- Get / Set resources
- Save() : Result
- Save instance
- SearchFields() : array<string|int, mixed>
- Return search indexer fields Convert instance to search indexer values
- SubTask() : TaskPart|null
- Load a single sub task
- SubTasks() : array<string|int, mixed>
- Get list of tasks
- TaskProject() : TaskProject|null
- Resolve the main project of this service/bill
- TimeConsumption() : float
- Calculate overall used time
- Times() : array<string|int, mixed>
- Get time entries
- UpdateResourceIndex() : Result
- Update the linked list Does an update of the directly related resources index.
- database() : CalendarDBAL|null
- Get a database abstraction layer interface
- eventDatabase() : EventDBAL|null
- Get a database abstraction layer interface
Properties
$
public
int|null
$
require_confirmation
$db
private
CalendarDBAL|null
$db
= null
CalendarDBAL|null
$edb
private
EventDBAL|null
$edb
= null
EventDBAL|null
$offsets
private
array<string|int, mixed>
$offsets
= array(3, 24, 72)
List of time offsets reminders are generated for
$parent
private
TaskProject|null
$parent
= null
TaskProject|null A project relation
$relation
private
Relation|null
$relation
= null
Relation|null A system assignment relation $
$root
root storage folder starting at %DATA%/folder/
private
string
$root
= 'media/tasks/'
$service
The cached linked service
private
Service|null
$service
= null
Methods
__construct()
Task constructor.
public
__construct([string|null $id = null ][, string|null $language = null ][, string|null $subtype = 'task' ]) : mixed
Parameters
- $id : string|null = null
-
The task id
- $language : string|null = null
-
The local language or null
- $subtype : string|null = 'task'
-
The sub type
Return values
mixed —Assignment()
public
Assignment( $id) : array<string|int, mixed>|null
Parameters
Return values
array<string|int, mixed>|null —Attachments()
Get/Set list of attached files
public
Attachments([null $files = null ]) : array<string|int, mixed>|null
Parameters
- $files : null = null
Return values
array<string|int, mixed>|null —Author()
Get the original author of the task
public
Author() : User|null
Return values
User|null —ChangeEmployeeAssignment()
Change assignments of employee in this task
public
ChangeEmployeeAssignment(string $id, array<string|int, mixed>|null $data) : Result
Parameters
- $id : string
-
Unique id of the entry or null when not
- $data : array<string|int, mixed>|null
-
The assign data
Return values
Result —A system result object
Comments()
Get list of comments
public
Comments() : array<string|int, mixed>|mixed
Return values
array<string|int, mixed>|mixed —Delete()
Delete this task and update the related service
public
Delete([false $skip = false ]) : Result|null
Parameters
- $skip : false = false
Return values
Result|null —Employees()
List employee attribute array
public
Employees([bool $ids_only = false ]) : array<string|int, mixed>
Parameters
- $ids_only : bool = false
Return values
array<string|int, mixed> —EmployeesResolved()
Resolved list of employees
public
EmployeesResolved() : array<string|int, mixed>
Return values
array<string|int, mixed> —EmployeeTimeLimit()
Get time limit of certain employee
public
EmployeeTimeLimit( $id) : int
Parameters
Return values
int —GeneralSearchFields()
Get the default search fields
public
GeneralSearchFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —RelatedService()
Get linked service
public
RelatedService() : Service|null
Get the object instance of the linked service if it is defined and loadable This method is cached
Return values
Service|null —Relation()
Get/Set relation of task
public
Relation([Relation|null $relation = null ]) : Relation|null
Will try to load the main relation on the fly
Parameters
- $relation : Relation|null = null
-
The new relation
Return values
Relation|null —The relation
Resources()
Get / Set resources
public
Resources([array<string|int, mixed>|null $new = null ]) : array<string|int, mixed>
Parameters
- $new : array<string|int, mixed>|null = null
Return values
array<string|int, mixed> —Save()
Save instance
public
Save([bool $force_new_id = false ]) : Result
Parameters
- $force_new_id : bool = false
Return values
Result —SearchFields()
Return search indexer fields Convert instance to search indexer values
public
SearchFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —The search indexer fields
SubTask()
Load a single sub task
public
SubTask( $index) : TaskPart|null
Parameters
Return values
TaskPart|null —SubTasks()
Get list of tasks
public
SubTasks() : array<string|int, mixed>
Return values
array<string|int, mixed> —TaskProject()
Resolve the main project of this service/bill
public
TaskProject([TaskProject|null $relation = null ]) : TaskProject|null
Parameters
- $relation : TaskProject|null = null
Return values
TaskProject|null —TimeConsumption()
Calculate overall used time
public
TimeConsumption() : float
Return values
float —Times()
Get time entries
public
Times() : array<string|int, mixed>
Return values
array<string|int, mixed> —UpdateResourceIndex()
Update the linked list Does an update of the directly related resources index.
public
UpdateResourceIndex() : Result
Return values
Result —A system result object
database()
Get a database abstraction layer interface
private
database() : CalendarDBAL|null
Return values
CalendarDBAL|null —eventDatabase()
Get a database abstraction layer interface
private
eventDatabase() : EventDBAL|null