Свойство | Тип | Описание | |
---|---|---|---|
$actual | float | The actual task length. | |
$alarm | integer | The task alarm threshold in minutes. | |
$assignee | string | The task assignee. | |
$children | array | The sub-tasks. | |
$complete_link | string | URL to complete the task. | |
$completed | boolean | Whether the task is completed. | |
$completed_date | integer | The completion date timestamp. | |
$created | Horde_Date | The creation time. | |
$createdby | string | The creator string. | |
$delete_link | string | URL to delete the task. | |
$desc | string | The task decription. | |
$due | integer | The due date timestamp. | |
$edit_link | string | URL to edit the task. | |
$estimate | float | The estimated task length. | |
$id | string | The task id. | |
$indent | integer | This task's idention (child) level. | |
$internaltags | array | Task tags from the storage backend (e.g. Kolab) | |
$lastChild | boolean | Whether this is the last sub-task. | |
$methods | array | The particular alarm methods overridden for this task. | |
$modified | Horde_Date | The last modification time. | |
$modifiedby | string | The last-modifier string. | |
$name | string | The task title. | |
$organizer | string | Task organizer | |
$owner | string | The task owner. | |
$parent | Nag_Task | The parent task. | |
$parent_id | string | The parent task's id. | |
$priority | integer | The task priority from 1 = highest to 5 = lowest. | |
$private | boolean | Whether the task is private. | |
$recurrence | Horde_Date_Recurrence | Recurrence rules for recurring tasks. | |
$snooze | integer | Snooze minutes for this event's alarm. | |
$start | integer | The start date timestamp. | |
$status | integer | The assignment status of this task. | |
$tasklist | string | This task's tasklist id. | |
$tasklist_name | string | Overrides the $tasklist's share name. | |
$uid | string | The task uid. | |
$view_link | string | URL to view the task. |
Свойство | Тип | Описание | |
---|---|---|---|
$_dict | array | Task id => pointer dictionary. | |
$_inlist | boolean | Internal flag. | |
$_pointer | integer | Internal pointer. | |
$_storage | Nag_Driver | A storage driver. | |
$_tags | string | Task tags (lazy loaded). |
Метод | Описание | |
---|---|---|
__clone ( ) | Deep clone so we can clone the child objects too. | |
__construct ( Nag_Driver $storage = null, array $task = null ) | Constructor. | |
__get ( string $name ) : mixed | Getter. | |
__set ( string $name, mixed $value ) | Setter. | |
actuals ( ) : integer | Returns the actual length for this and any sub tasks. | |
add ( Nag_Task $task, $replace = false ) | Adds a sub task to this task. | |
backgroundColor ( ) : string | Returns the background color. | |
childrenCompleted ( ) : boolean | Returns whether all sub tasks are completed. | |
childrenOverdue ( ) : boolean | Returns whether any tasks in the list are overdue. | |
count ( ) : integer | Returns the number of tasks including this and any sub tasks. | |
each ( ) | Returns the next task iterating through all tasks and sub tasks. | |
estimation ( ) : integer | Returns the estimated length for this and any sub tasks. | |
foregroundColor ( ) : string | Returns the foreground color. | |
fromASTask ( Horde_ActiveSync_Message_Task $message ) | Create a nag Task object from an activesync message | |
fromiCalendar ( Horde_Icalendar_Vtodo $vTodo ) | Creates a task from a Horde_Icalendar_Vtodo object. | |
get ( string $key ) : Nag_Task | Returns a sub task by its id. | |
getFormattedDescription ( ) : string | Format the description - link URLs, etc. | |
getNextDue ( ) : Horde_Date | null | Returns the next due date of this task. | |
getNextStart ( ) : Horde_Date | Returns the next start date of this task. | |
getParent ( ) : mixed | Returns the parent task of this task, if one exists. | |
getSlice ( integer $page, integer $perpage = null ) : Nag_Task | Helper method for getting only a slice of the total tasks in this list. | |
hasSubTasks ( ) : boolean | Returns whether this task contains any sub tasks. | |
hasTask ( string $taskId ) : Nag_Task | false | Return the task, if present anywhere in this tasklist, regardless of child depth. | |
hasTasks ( ) : boolean | Returns whether this is a task (not a container) or contains any sub tasks. | |
loadChildren ( $include_history = true ) | Loads all sub-tasks. | |
loadTags ( ) | Recursively loads tags for all tasks contained in this object. | |
merge ( array $task ) | Merges a task hash into this task object. | |
mergeChildren ( array $children ) | Merges an array of tasks into this task's children. | |
orphan ( ) | Disconnect this task from any child tasks. Used when building search result sets since child tasks will be re-added if they actually match the result, and there is no guarentee that a tasks's parent will be present in the result set. | |
process ( integer $indent = null ) | Processes a list of tasks by adding action links, obscuring details of private tasks and calculating indentation. | |
recurs ( ) : boolean | Returns whether this task is a recurring task. | |
reset ( ) | Resets the tasks iterator. | |
save ( ) | Saves this task in the storage backend. | |
sort ( string $sortby, integer $sortdir, string $altsortby ) | Sorts sub tasks by the given criteria. | |
synchronizeTags ( array $tags ) | Syncronizes tags from the tagging backend with the task storage backend, if necessary. | |
toASTask ( array $options = [] ) : Horde_ActiveSync_Message_Task | Create an AS message from this task | |
toAlarm ( string $user = null, Prefs $prefs = null ) : array | Returns an alarm hash of this task suitable for Horde_Alarm. | |
toHash ( ) : array | Returns a hash representation for this task. | |
toJson ( boolean $full = false, string $time_format = 'H:i' ) : object | Returns a simple object suitable for json transport representing this task. | |
toggleComplete ( $ignore_children = false ) | Toggles completion status of this task. Moves a recurring task to the next occurence on completion. Enforces the rule that sub tasks must be completed before parent tasks. | |
toiCalendar ( Horde_Icalendar $calendar ) : Horde_Icalendar_Vtodo | Exports this task in iCalendar format. | |
treeIcons ( ) : string | Returns the HTML code for any tree icons, when displaying this task in a tree view. |
public __construct ( Nag_Driver $storage = null, array $task = null ) | ||
$storage | Nag_Driver | A storage driver. |
$task | array | A task hash. |
public add ( Nag_Task $task, $replace = false ) | ||
$task | Nag_Task | A sub task. |
public backgroundColor ( ) : string | ||
Результат | string | A HTML color code. |
public childrenCompleted ( ) : boolean | ||
Результат | boolean | True if all sub tasks are completed. |
public childrenOverdue ( ) : boolean | ||
Результат | boolean | True if any task or sub tasks are overdue. |
$tasks->reset();
while ($task = $tasks->each() {
...
}
public each ( )
Returns the estimated length for this and any sub tasks.
public estimation ( ) : integer
Результат
integer
The estimated length sum.
Returns the foreground color.
public foregroundColor ( ) : string
Результат
string
A HTML color code.
Create a nag Task object from an activesync message
public fromASTask ( Horde_ActiveSync_Message_Task $message )
$message
Horde_ActiveSync_Message_Task
The task object
Creates a task from a Horde_Icalendar_Vtodo object.
public fromiCalendar ( Horde_Icalendar_Vtodo $vTodo )
$vTodo
Horde_Icalendar_Vtodo
The iCalendar data to update from.
The methods goes recursively through all sub tasks until it finds the
searched task.
Format the description - link URLs, etc.
public getFormattedDescription ( ) : string
Результат
string
Takes recurring tasks into account.
public getNextDue ( ) : Horde_Date | null
Результат
Horde_Date | null
The next due date or null if no due date.
Takes recurring tasks into account.
public getNextStart ( ) : Horde_Date
Результат
Horde_Date
The next start date.
Returns the parent task of this task, if one exists.
Helper method for getting only a slice of the total tasks in this list.
Returns whether this task contains any sub tasks.
public hasSubTasks ( ) : boolean
Результат
boolean
True if this task has sub tasks.
Return the task, if present anywhere in this tasklist, regardless of
child depth.
Returns whether this is a task (not a container) or contains any sub
tasks.
Recursively loads tags for all tasks contained in this object.
public loadTags ( )
Merges a task hash into this task object.
Merges an array of tasks into this task's children.
public mergeChildren ( array $children )
$children
array
A list of Nag_Tasks.
Disconnect this task from any child tasks. Used when building search
result sets since child tasks will be re-added if they actually match
the result, and there is no guarentee that a tasks's parent will
be present in the result set.
public orphan ( )
Processes a list of tasks by adding action links, obscuring details of
private tasks and calculating indentation.
Returns whether this task is a recurring task.
Sorts sub tasks by the given criteria.
public sort ( string $sortby, integer $sortdir, string $altsortby )
$sortby
string
The field by which to sort
(Nag::SORT_PRIORITY, Nag::SORT_NAME
Nag::SORT_DUE, Nag::SORT_COMPLETION).
$sortdir
integer
The direction by which to sort
(Nag::SORT_ASCEND, Nag::SORT_DESCEND).
$altsortby
string
The secondary sort field.
Syncronizes tags from the tagging backend with the task storage backend,
if necessary.
public synchronizeTags ( array $tags )
$tags
array
Tags from the tagging backend.
Create an AS message from this task
public toASTask ( array $options = [] ) : Horde_ActiveSync_Message_Task
$options
array
Options:
- protocolversion: (float) The EAS version to support
DEFAULT: 2.5
- bodyprefs: (array) A BODYPREFERENCE array.
DEFAULT: none (No body prefs enforced).
- truncation: (integer) Truncate event body to this length
DEFAULT: none (No truncation).
Результат
Horde_ActiveSync_Message_Task
Returns an alarm hash of this task suitable for Horde_Alarm.
Returns a hash representation for this task.
Returns a simple object suitable for json transport representing this
task.
Toggles completion status of this task. Moves a recurring task
to the next occurence on completion. Enforces the rule that sub
tasks must be completed before parent tasks.
public toggleComplete ( $ignore_children = false )
Exports this task in iCalendar format.
public toiCalendar ( Horde_Icalendar $calendar ) : Horde_Icalendar_Vtodo
$calendar
Horde_Icalendar
A Horde_Icalendar object that acts as
the container.
Результат
Horde_Icalendar_Vtodo
A vtodo component of this task.
Returns the HTML code for any tree icons, when displaying this task in
a tree view.
Описание свойств
URL to complete the task.
public string $complete_link
Результат
string
Whether the task is completed.
public bool $completed
Результат
boolean
The completion date timestamp.
public int $completed_date
Результат
integer
Task tags from the storage backend (e.g. Kolab)
public array $internaltags
Результат
array
Whether this is the last sub-task.
public bool $lastChild
Результат
boolean
The particular alarm methods overridden for this task.
public array $methods
Результат
array
The last modification time.
public Horde_Date $modified
Результат
Horde_Date
The task priority from 1 = highest to 5 = lowest.
public int $priority
Результат
integer
Recurrence rules for recurring tasks.
public Horde_Date_Recurrence $recurrence
Результат
Horde_Date_Recurrence
Snooze minutes for this event's alarm.
public int $snooze
Результат
integer
Overrides the $tasklist's share name.
public string $tasklist_name
Результат
string