Property | Type | Description | |
---|---|---|---|
$_fieldTypes | array | All available form field types including all type information from the Horde_Form classes. | |
$_sortBy | string | The current sort field. | |
$_sortDir | integer | The current sort direction. | |
$_users | array | Cached list of user information. |
Method | Description | |
---|---|---|
addFeedLink ( ) | ||
addTopbarSearch ( ) | Adds topbar search to page | |
attachmentUrl ( integer $ticket, string $file, integer $queue ) : array | Returns the links to view, download, and delete an attachment. | |
fieldTypeNames ( ) : array | Returns the available field type names from the Horde_Form classes. | |
fieldTypeParams ( string $field_type ) : array | Returns the parameters for a certain Horde_Form field type. | |
fieldTypes ( ) : array | Returns all available form field types including all type information from the Horde_Form classes. | |
formatColumn ( array $info, string $value ) : string | Formats a ticket property for a tabular ticket listing. | |
formatUser ( string | array $user = null, boolean $showemail = true, boolean $showname = true, boolean $html = false ) | Returns a user string from the user's name and email address. | |
getAddressbookSearchParams ( ) : array | Returns the parameters necessary to run an address search. | |
getAttachments ( integer $ticket, string $name = null ) : array | Returns attachment information hashes from the VFS backend. | |
getCAPTCHA ( boolean $new = false ) : string | Returns a new or the current CAPTCHA string. | |
getCurrentTicket ( ) : Whups_Ticket | Returns the current ticket. | |
getOwnerCriteria ( string $user ) : array | Builds a list of criteria for Whups_Driver#getTicketsByProperties() that match a certain user. | |
getOwners ( integer $ticket, $showemail = true, boolean $showname = true, array $owners = null ) : string | Returns formatted owner names of a ticket. | |
getSearchResultColumns ( integer $search_type = null, array $columns = null ) | Returns the set of columns and their associated parameter from the backend that should be displayed to the user. | |
getTicketTabs ( &$vars, $id ) | Returns the tabs for navigating between ticket actions. | |
getUserAttributes ( string $user = null ) : array | Returns a hash with user information. | |
hasMessage ( integer $ticket, integer $id ) : boolean | Returns whether an original message for a ticket comment exists. | |
hasPermission ( mixed $in, string $filter, string | integer $permission, string $user = null ) : boolean | Returns whether a user has a certain permission on a single resource. | |
listTemplates ( string $type ) : array | Lists all templates of a given type. | |
messageUrls ( integer $ticket, $message, integer $queue ) : array | Returns the links to view, download, and delete an original message. | |
permissionsFilter ( array $in, string $filter, integer $permission = Horde_Perms::READ, string $user = null, string $creator = null ) : array | Filters a list of resources based on whether a user has certain permissions on it. | |
sendReminders ( Horde_Variables $vars ) | Sends reminders, one email per user. | |
sortBy ( string $b = null ) : string | Sets or returns the current sort field. | |
sortDir ( integer $d = null ) : integer | Sets or returns the current sort direction. | |
sortTickets ( array &$tickets, string $by = null, string $dir = null ) | Sorts tickets by requested direction and fields. | |
urlFor ( string $controller, array | string $data, boolean $full = false, integer $append_session ) : Horde_Url | URL factory. |
Method | Description | |
---|---|---|
_prepareSort ( array $ticket ) : array | Helper method to prepare an array of tickets for sorting. | |
_sort ( array $a, array $b, string $sortby = null, string $sortdir = null ) : integer | Helper method to sort an array of tickets. |
protected static _prepareSort ( array $ticket ) : array | ||
$ticket | array | The ticket array to prepare. |
return | array | The altered $ticket array |
protected static _sort ( array $a, array $b, string $sortby = null, string $sortdir = null ) : integer | ||
$a | array | The first ticket to compare. |
$b | array | The second ticket to compare. |
$sortby | string | The field to sort by. If null, uses the field from self::sortBy(). |
$sortdir | string | The direction to sort. If null, uses the value from self::sortDir(). |
return | integer |
public static fieldTypeNames ( ) : array | ||
return | array | A hash The with available field types and names. |
public static fieldTypeParams ( string $field_type ) : array | ||
$field_type | string | A field type. |
return | array | A list of field type parameters. |
public static fieldTypes ( ) : array | ||
return | array | The full field types array. |
public static formatUser ( string | array $user = null, boolean $showemail = true, boolean $showname = true, boolean $html = false ) | ||
$user | string | array | A user name or a hash as returned from {@link self::getUserAttributes()}. |
$showemail | boolean | Whether to include the email address. |
$showname | boolean | Whether to include the full name. |
$html | boolean | 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. |
public static getAddressbookSearchParams ( ) : array | ||
return | array | An array with two keys: 'sources' and 'fields'. |
public static getCAPTCHA ( boolean $new = false ) : string | ||
$new | boolean | If true, a new CAPTCHA is created and returned. The current, to-be-confirmed string otherwise. |
return | string | A CAPTCHA string. |
public static getCurrentTicket ( ) : Whups_Ticket | ||
return | Whups_Ticket | The current ticket. |
public static getOwnerCriteria ( string $user ) : array | ||
$user | string | A user name. |
return | array | A list of criteria that would match the user. |
public static getOwners ( integer $ticket, $showemail = true, boolean $showname = true, array $owners = null ) : string | ||
$ticket | integer | A ticket id. Only used if $owners is null. |
$showname | boolean | Should we include the name in the output? |
$owners | array | An array of owners as returned from Whups_Driver::getOwners() to be formatted. If this is provided, they are used instead of the owners from $ticket. |
return | string | The formatted owner string. |
public static getSearchResultColumns ( integer $search_type = null, array $columns = null ) | ||
$search_type | integer | The type of search that was executed. Currently only 'block' is supported. |
$columns | array | The columns to return, overriding the defaults for some $search_type. |
public static getTicketTabs ( &$vars, $id ) |
public static getUserAttributes ( string $user = null ) : array | ||
$user | string | A (Whups) user name, defaults to the current user. |
return | array | An information hash with 'user', 'name', 'email', and 'type' values. |
public static hasPermission ( mixed $in, string $filter, string | integer $permission, string $user = null ) : boolean | ||
$in | mixed | A single resource to check. |
$filter | string | The kind of resource specified in $in, currently only 'queue'. |
$permission | string | integer | A permission, either 'assign' or 'update', 'requester', or one of the PERM_* constants. |
$user | string | A user name. |
return | boolean | True if the user has the specified permission. |
public static listTemplates ( string $type ) : array | ||
$type | string | The kind of template ('searchresults', etc.) to list. |
return | array | All templates of the requested type. |
public static permissionsFilter ( array $in, string $filter, integer $permission = Horde_Perms::READ, string $user = null, string $creator = null ) : array | ||
$in | array | A list of resources to check. |
$filter | string | The kind of resource specified in $in, one of 'queue', 'queue_id', 'reply', or 'comment'. |
$permission | integer | A permission, one of the PERM_* constants. |
$user | string | A user name. |
$creator | string | The creator of an object in the resource, e.g. a ticket creator. |
return | array | The list of resources matching the permission criteria. |
public static sendReminders ( Horde_Variables $vars ) | ||
$vars | Horde_Variables | The selection criteria: - 'id' (integer) for individual tickets - 'queue' (integer) for tickets of a queue. - 'category' (array) for ticket categories, defaults to unresolved tickets. - 'unassigned' (boolean) for unassigned tickets. |
public static urlFor ( string $controller, array | string $data, boolean $full = false, integer $append_session ) : Horde_Url | ||
$controller | string | The controller to link to, one of 'queue', 'ticket', 'ticket_rss', 'ticket_action', 'query', 'query_rss'. |
$data | array | string | URL data, depending on the controller. |
$full | boolean | @see Horde::url() |
$append_session | integer | @see Horde::url() |
return | Horde_Url | The generated URL. |
protected static array $_fieldTypes | ||
return | array |
protected static string $_sortBy | ||
return | string |
protected static int $_sortDir | ||
return | integer |
protected static array $_users | ||
return | array |