$_links
$_links : array
Links.
Nag external API interface.
This file defines Nag's external API interface. Other applications can interact with Nag through this API.
listTasks(\arary $options = array()) : array
Retrieves the current user's task list from storage.
This function will also sort the resulting list, if requested.
\arary | $options | Options array:
|
An array of the requested tasks.
listTasklists(boolean $owneronly = false, integer $permission = \Horde_Perms::SHOW, boolean $smart = true) : array
Returns a list of task lists.
boolean | $owneronly | Only return tasklists that this user owns? Defaults to false. |
integer | $permission | The permission to filter tasklists by. |
boolean | $smart | Include smart tasklists in results. |
The task lists.
addTasklist(string $name, string $description = '', string $color = '', array $params = array()) : string
Adds a new task list.
string | $name | Task list name. |
string | $description | Task list description. |
string | $color | Task list color. |
array | $params | Any addtional parameters needed. @since 4.2.1
|
The new tasklist's id.
updateAttendee(\Horde_Icalendar_Vtodo $response, string $sender = null)
Updates an attendee's response status for a specified task assignment.
\Horde_Icalendar_Vtodo | $response | A Horde_Icalendar_Vtodo object, with a valid UID attribute that points to an existing task. This is typically the vTodo portion of an iTip task-request response, with the attendee's response in an ATTENDEE parameter. |
string | $sender | The email address of the person initiating the update. Attendees are only updated if this address matches. |
Horde_Exception_PermissionDenied
listUids(mixed $tasklists = null) : array
Returns an array of UIDs for all tasks that the current user is authorized to see.
mixed | $tasklists | The tasklist or an array of taskslists to list. |
An array of UIDs for all tasks the user can access.
listBy(string $action, integer $timestamp, string $tasklist = null, integer $end = null, boolean $isModSeq = false) : array
Returns an array of UIDs for tasks that have had $action happen since $timestamp.
string | $action | The action to check for - add, modify, or delete. |
integer | $timestamp | The time to start the search. |
string | $tasklist | The tasklist to be used. If 'null', the user's default tasklist will be used. |
integer | $end | The optional ending timestamp. |
boolean | $isModSeq | If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1 |
An array of UIDs matching the action and time criteria.
getChanges(integer $start, integer $end, boolean $isModSeq = false, string $tasklist = null) : array
Method for obtaining all server changes between two timestamps. Basically a wrapper around listBy(), but returns an array containing all adds, edits and deletions.
integer | $start | The starting timestamp |
integer | $end | The ending timestamp. |
boolean | $isModSeq | If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1 |
string | $tasklist | The sources to check. @since 4.2.0 |
An hash with 'add', 'modify' and 'delete' arrays.
getChangesByModSeq(integer $start, integer $end, string $tasklist = null) : array
Return all changes occuring between the specified modification sequences.
integer | $start | The starting modseq. |
integer | $end | The ending modseq. |
string | $tasklist | The sources to check. @since 4.2.0 |
The changes @see getChanges()
getActionTimestamp(string $uid, string $action, string $tasklist = null, boolean $modSeq = false) : integer
Returns the timestamp of an operation for a given uid an action.
string | $uid | The uid to look for. |
string | $action | The action to check for - add, modify, or delete. |
string | $tasklist | The tasklist to be used. If 'null', the user's default tasklist will be used. |
boolean | $modSeq | Request a modification sequence instead of a timestamp. @since 4.1.1 |
The timestamp for this action.
import(string $content, string $contentType, string $tasklist = null) : string
Imports one or more tasks represented in the specified content type.
If a UID is present in the content and the task is already in the database, a replace is performed rather than an add.
string | $content | The content of the task. |
string | $contentType | What format is the data in? Currently supports: text/calendar text/x-vcalendar |
string | $tasklist | The tasklist into which the task will be imported. If 'null', the user's default tasklist will be used. |
The new UID on one import, an array of UIDs on multiple imports,
quickAdd(string $text, string $tasklist = null) : array
Imports one or more tasks parsed from a string.
string | $text | The text to parse into |
string | $tasklist | The tasklist into which the task will be imported. If 'null', the user's default tasklist will be used. |
The UIDs of all tasks that were added.
toggleCompletion(string $task_id, string $tasklist_id) : boolean|string
Toggles the task completion flag.
string | $task_id | The task ID. |
string | $tasklist_id | The tasklist that contains the task. |
True if the task has been toggled, a due date if there are still incomplete recurrences, otherwise false.
export(string $uid, string $contentType, array $options = array()) : string
Exports a task, identified by UID, in the requested content type.
string | $uid | Identify the task to export. |
string | $contentType | What format should the data be in? A string with one of:
|
array | $options | Any additional options for the exporter. |
The requested data.
getTask(string $tasklist, string $id) : \Nag_Task
Returns a task object.
string | $tasklist | A tasklist id. |
string | $id | A task id. |
The matching task object.
exportTasklist(string $tasklist, string $contentType) : string
Exports a tasklist in the requested content type.
string | $tasklist | The tasklist to export. |
string | $contentType | What format should the data be in? A string with one of: text/calendar (VCALENDAR 2.0. Recommended as this is specified in rfc2445) text/x-vcalendar (old VCALENDAR 1.0 format. Still in wide use) |
The iCalendar representation of the tasklist.
replace(string $uid, string $content, string $contentType) : boolean
Replaces the task identified by UID with the content represented in the specified content type.
If you want to replace multiple tasks with the UID specified in the VCALENDAR data, you may use $this->import instead. This automatically does a replace if existings UIDs are found.
string | $uid | Identify the task to replace. |
string | $content | The content of the task. |
string | $contentType | What format is the data in? Currently supports:
|
Success or failure.
sources(boolean $writeable = false, boolean $sync_only = false) : array
Returns a list of available sources.
boolean | $writeable | If true, limits to writeable sources. |
boolean | $sync_only | Only include synchable address books. |
An array of the available sources. Keys are source IDs, values are source titles.
listTagInfo(array $tags = null, $user = null) : array
Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.
array | $tags | An optional array of tag_ids. If omitted, all tags will be included. |
$user |
An array containing tag_name, and total
searchTags(array $names, integer $max = 10, integer $from, string $resource_type = '', string $user = null, boolean $raw = false) : array
SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)
The 'raw' results array can be returned instead by setting $raw = true.
array | $names | An array of tag_names to search for. |
integer | $max | The maximum number of resources to return. |
integer | $from | The number of the resource to start with. |
string | $resource_type | The resource type [bookmark, ''] |
string | $user | Restrict results to resources owned by $user. |
boolean | $raw | Return the raw data? |
An array of results:
'title' - The title for this resource. 'desc' - A terse description of this resource. 'view_url' - The URL to view this resource. 'app' - The Horde application this resource belongs to. 'icon' - URL to an image.