Add inline javascript to the output buffer.
string
addInlineScript
(mixed $script)
-
mixed
$script: The script text to add (can be stored in an array also).
void
attachmentUrl
( $ticket, $file, $queue)
Returns the available field type names from the Horde_Form classes.
array
fieldTypeNames
()
Returns the parameters for a certain Horde_Form field type.
array
fieldTypeParams
(string $field_type)
-
string
$field_type: A field type.
Retruns the available field types including all type information from the Horde_Form classes.
array
fieldTypes
()
Returns a user string from the user's name and email address.
void
formatUser
([string|array $user = null], [boolean $showemail = true], [boolean $showname = true], [boolean $html = false])
-
string|array
$user: A user name or a hash as returned from Whups::getUserAttributes().
-
boolean
$showemail: Whether to include the email address.
-
boolean
$showname: Whether to include the full name.
-
boolean
$html: Whether to "prettify" the result. If true, email addresses are obscured, the result is escaped for HTML output, and a group icon might be added.
void
getAttachments
( $ticket, [ $name = null])
Returns a new or the current CAPTCHA string.
string
getCAPTCHA
([boolean $new = false])
-
boolean
$new: If true, a new CAPTCHA is created and returned. The current, to-be-confirmed string otherwise.
Get the current ticket - use the 'id' request variable to determine what to look for. Will redirect to the default view if the ticket isn't found or if permissions checks fail.
void
getCurrentTicket
()
Build Whups' list of menu items.
void
getMenu
([ $returnType = 'object'])
void
getOwnerCriteria
( $user)
void
getOwners
( $ticket, [ $showemail = true], [ $showname = true], [ $owners = null])
-
$ticket
-
$showemail
-
$showname
-
$owners
Returns the set of columns and their associated parameter from the backend that should be displayed to the user. The results can depend on the current user preferences and which search function was executed.
void
getSearchResultColumns
([integer $search_type = null])
-
integer
$search_type: The type of search that was executed. Must be one of the WHUPS_SEARCH_ constants defined above.
Get the tabs for navigating between ticket actions.
void
getTicketTabs
( &$vars, $id)
void
getUserAttributes
([ $user = null])
Returns whether a user has a certain permission on a single resource.
boolean
hasPermission
(mixed $in, string $filter, string|integer $permission, [string $user = null])
-
mixed
$in: A single resource to check.
-
string
$filter: The kind of resource specified in $in, currently only 'queue'.
-
string|integer
$permission: A permission, either 'assign' or 'update', or one of the PERM_* constants.
-
string
$user: A user name.
List all templates of a given type.
array
listTemplates
(string $type)
-
string
$type: The kind of template ('searchresults', etc.) to list.
Print inline javascript to the output buffer.
string
outputInlineScript
()
Filters a list of resources based on whether a user use certain permissions on it.
array
permissionsFilter
(array $in, string $filter, [integer $permission = PERMS_READ], [string $user = null], [string $creator = null])
-
array
$in: A list of resources to check.
-
string
$filter: The kind of resource specified in $in, one of 'queue', 'queue_id', 'reply', or 'comment'.
-
integer
$permission: A permission, one of the PERM_* constants.
-
string
$user: A user name.
-
string
$creator: The creator of an object in the resource, e.g. a ticket creator.
Send reminders. One email per user.
void
sendReminders
(Variables &$vars)
-
Variables
&$vars: The selection criteria.
void
sortBy
([ $b = null])
void
sortDir
([ $d = null])
void
sortTickets
( &$tickets, [ $by = null], [ $dir = null])
void
urlFor
( $controller, $data, [ $full = false], [ $append_session = 0])
-
$controller
-
$data
-
$full
-
$append_session
void
_sort
( $a, $b, [ $sortby = null], [ $sortdir = null])