$id
$id : string
The task id.
Nag_Task handles as single task as well as a list of tasks and implements a recursive iterator to handle a (hierarchical) list of tasks.
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
$parent : \Nag_Task
The parent task.
$_storage : \Nag_Driver
A storage driver.
__construct(\Nag_Driver $storage = null, array $task = null)
Constructor.
Takes a hash and returns a nice wrapper around it.
\Nag_Driver | $storage | A storage driver. |
array | $task | A task hash. |
add(\Nag_Task $task, $replace = false)
Adds a sub task to this task.
\Nag_Task | $task | A sub task. |
$replace |
get(string $key) : \Nag_Task
Returns a sub task by its id.
The methods goes recursively through all sub tasks until it finds the searched task.
string | $key | A task id. |
The searched task or null.
hasTask(string $taskId) : \Nag_Task|false
Return the task, if present anywhere in this tasklist, regardless of child depth.
string | $taskId | The task id we are looking for. |
The task object, if found. Otherwise false.
getSlice(integer $page, integer $perpage = null) : \Nag_Task
Helper method for getting only a slice of the total tasks in this list.
integer | $page | The starting page. |
integer | $perpage | The count of tasks per page. |
The resulting task list.
sort(string $sortby, integer $sortdir, string $altsortby)
Sorts sub tasks by the given criteria.
string | $sortby | The field by which to sort (Nag::SORT_PRIORITY, Nag::SORT_NAME Nag::SORT_DUE, Nag::SORT_COMPLETION). |
integer | $sortdir | The direction by which to sort (Nag::SORT_ASCEND, Nag::SORT_DESCEND). |
string | $altsortby | The secondary sort field. |
toJson(boolean $full = false, string $time_format = 'H:i') : object
Returns a simple object suitable for json transport representing this task.
boolean | $full | Whether to return all task details. |
string | $time_format | The date() format to use for time formatting. |
A simple object.
toASTask(array $options = array()) : \Horde_ActiveSync_Message_Task
Create an AS message from this task
array | $options | Options:
|