Builds the HTML for a checkbox widget.
string
buildCheckboxWidget
(string $name, [integer $checked = 0])
-
string
$name: The name of the widget.
-
integer
$checked: The default checkbox state.
Builds the HTML for a priority selection widget.
string
buildPriorityWidget
(string $name, [integer $selected = -1])
-
string
$name: The name of the widget.
-
integer
$selected: The default selected priority.
Returns the number of taks in task lists that the current user owns.
integer
countTasks
()
Returns the string matching the given alarm value.
string
formatAlarm
(int $value)
-
int
$value: The alarm value in minutes.
Returns the full name and a compose to message an assignee.
string
formatAssignee
(string $assignee, [boolean $link = false])
-
string
$assignee: The assignee's user name.
-
boolean
$link: Whether to link to an email compose screen.
Returns the string representation of the given completion status.
string
formatCompletion
(int $completed)
-
int
$completed: The completion value.
Formats the given Unix-style date string.
string
formatDate
([string $unixdate = ''], [boolean $hours = true])
-
string
$unixdate: The Unix-style date value to format.
-
boolean
$hours: Whether to add hours.
Returns a colored representation of a priority.
string
formatPriority
(int $priority)
-
int
$priority: The priority level.
Returns the default tasklist for the current user at the specified permissions level.
void
getDefaultTasklist
([ $permission = PERMS_SHOW])
Build Nag's list of menu items.
void
getMenu
([ $returnType = 'object'])
Returns a single task.
array
getTask
(string $tasklist, string $task)
-
string
$tasklist: A tasklist.
-
string
$task: A task id.
Returns the real name, if available, of a user.
void
getUserName
( $uid)
Returns the specified permission for the current user.
mixed
hasPermission
(string $permission)
-
string
$permission: A permission, currently only 'max_tasks'.
Initial app setup code.
void
initialize
()
Returns all the alarms active right on $date.
array
listAlarms
(integer $date, [ $tasklists = null])
-
integer
$date: The unix epoch time to check for alarms.
-
$tasklists
Lists all task lists a user has access to.
array
listTasklists
([boolean $owneronly = false], [integer $permission = PERMS_SHOW])
-
boolean
$owneronly: Only return tasklists that this user owns? Defaults to false.
-
integer
$permission: The permission to filter tasklists by.
Retrieves the current user's task list from storage.
This function will also sort the resulting list, if requested.
Nag_Task
listTasks
([
string $sortby =
null], [
integer $sortdir =
null], [
string $altsortby =
null], [
array $tasklists =
null], [
integer $completed =
null])
-
string
$sortby: The field by which to sort (NAG_SORT_*).
-
integer
$sortdir: The direction by which to sort (NAG_SORT_ASCEND, NAG_SORT_DESCEND).
-
string
$altsortby: The secondary sort field.
-
array
$tasklists: An array of tasklist to display or null/empty to display taskslists $GLOBALS['display_tasklists'].
-
integer
$completed: Which tasks to retrieve (1 = all tasks,
- = incomplete tasks, 2 = complete tasks,
3 = future tasks, 4 = future and incomplete tasks).
Filters data based on permissions.
array
permissionsFilter
(array $in, [integer $permission = PERMS_READ], string $filter)
-
array
$in: The data we want filtered.
-
string
$filter: What type of data we are filtering.
-
integer
$permission: The PERMS_* constant we will filter on.
void
secondsToString
( $seconds)
Sends email notifications that a task has been added, edited, or deleted to users that want such notifications.
void
sendNotification
(
string $action,
Nag_Task $task, [
Nag_Task $old_task =
null])
-
string
$action: The event action. One of "add", "edit", or "delete".
-
Nag_Task
$task: The changed task.
-
Nag_Task
$old_task: The original task if $action is "edit".
Comparison function for reverse sorting tasks by assignee.
integer
_rsortByAssignee
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by category.
integer
_rsortByCategory
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by completion status.
integer
_rsortByCompletion
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by due date.
integer
_rsortByDue
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by name.
integer
_rsortByEstimate
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by name.
integer
_rsortByName
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by owner.
integer
_rsortByOwner
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for reverse sorting tasks by priority.
integer
_rsortByPriority
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by assignee.
integer
_sortByAssignee
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by category.
integer
_sortByCategory
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by completion status.
integer
_sortByCompletion
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by due date.
integer
_sortByDue
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by assignee.
integer
_sortByEstimate
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by name.
integer
_sortByName
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by owner.
integer
_sortByOwner
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.
Comparison function for sorting tasks by priority.
integer
_sortByPriority
(array $a, array $b)
-
array
$a: Task one.
-
array
$b: Task two.