Overview

Packages

  • Horde
    • Form
    • MIME
      • Viewer
    • Scheduler
  • None
  • Whups
    • UnitTests

Classes

  • Horde_Core_Ui_VarRenderer_whups
  • Whups
  • Whups_Ajax_Imple_ContactAutoCompleter
  • Whups_Api
  • Whups_Driver
  • Whups_Driver_Sql
  • Whups_Form_AddComment
  • Whups_Form_Admin_AddAttribute
  • Whups_Form_Admin_AddPriority
  • Whups_Form_Admin_AddQueue
  • Whups_Form_Admin_AddReply
  • Whups_Form_Admin_AddState
  • Whups_Form_Admin_AddType
  • Whups_Form_Admin_AddUser
  • Whups_Form_Admin_AddVersion
  • Whups_Form_Admin_CloneType
  • Whups_Form_Admin_DefaultPriority
  • Whups_Form_Admin_DefaultState
  • Whups_Form_Admin_DeleteAttribute
  • Whups_Form_Admin_DeletePriority
  • Whups_Form_Admin_DeleteQueue
  • Whups_Form_Admin_DeleteReply
  • Whups_Form_Admin_DeleteState
  • Whups_Form_Admin_DeleteType
  • Whups_Form_Admin_DeleteVersion
  • Whups_Form_Admin_EditAttributeStepOne
  • Whups_Form_Admin_EditAttributeStepTwo
  • Whups_Form_Admin_EditPriorityStepOne
  • Whups_Form_Admin_EditPriorityStepTwo
  • Whups_Form_Admin_EditQueueStepOne
  • Whups_Form_Admin_EditQueueStepTwo
  • Whups_Form_Admin_EditReplyStepOne
  • Whups_Form_Admin_EditReplyStepTwo
  • Whups_Form_Admin_EditStateStepOne
  • Whups_Form_Admin_EditStateStepTwo
  • Whups_Form_Admin_EditTypeStepOne
  • Whups_Form_Admin_EditTypeStepTwo
  • Whups_Form_Admin_EditUser
  • Whups_Form_Admin_EditVersionStepOne
  • Whups_Form_Admin_EditVersionStepTwo
  • Whups_Form_InsertBranch
  • Whups_Form_Query_AttributeCriterion
  • Whups_Form_Query_ChooseNameForLoad
  • Whups_Form_Query_ChooseNameForSave
  • Whups_Form_Query_DateCriterion
  • Whups_Form_Query_Delete
  • Whups_Form_Query_GroupCriterion
  • Whups_Form_Query_Parameter
  • Whups_Form_Query_PropertyCriterion
  • Whups_Form_Query_TextCriterion
  • Whups_Form_Query_UserCriterion
  • Whups_Form_Renderer_Comment
  • Whups_Form_Search
  • Whups_Form_SendReminder
  • Whups_Form_Ticket_CreateStepFour
  • Whups_Form_Ticket_CreateStepOne
  • Whups_Form_Ticket_CreateStepThree
  • Whups_Form_Ticket_CreateStepTwo
  • Whups_Form_Ticket_Edit
  • Whups_Form_TicketDetails
  • Whups_LoginTasks_SystemTask_Upgrade
  • Whups_Mail
  • Whups_Query
  • Whups_Query_Manager
  • Whups_Reports
  • Whups_Ticket
  • Whups_View_Base
  • Whups_View_Results
  • Whups_View_SavedQueries
  • Overview
  • Package
  • Class
  • Tree

Class Whups_Ticket

The Whups_Ticket class encapsulates some logic relating to tickets, sending updates, etc.

Copyright 2004-2012 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Package: Whups
Author: Chuck Hagenbuch chuck@horde.org
Author: Jan Schneider jan@horde.org
Located at Ticket.php
Methods summary
public static Whups_Ticket
# makeTicket( integer $id )

Returns a ticket object for an id.

Returns a ticket object for an id.

Parameters

$id
The ticket id.

Returns

Whups_Ticket
Whups_Ticket object
public static Whups_Ticket
# newTicket( array $info, mixed $requester )

Creates a new ticket.

Creates a new ticket.

Pretty bare wrapper around Whups_Driver::addTicket().

Parameters

$info
A hash with ticket information.
$requester

Returns

Whups_Ticket
Whups_Ticket object.
public Whups_Ticket
# __construct( integer $id, array $details )

Constructor.

Constructor.

Parameters

$id
The ticket id.
$details
The hash of ticket information.

Returns

Whups_Ticket
public array
# getDetails( )

Returns all ticket information.

Returns all ticket information.

Returns

array
The ticket information.
public integer
# getId( )

Returns the ticket id.

Returns the ticket id.

Returns

integer
The ticket id.
public mixed
# get( string $detail )

Returns a piece of information from this ticket.

Returns a piece of information from this ticket.

Parameters

$detail
The detail to return.

Returns

mixed
The detail value.
public
# set( string $detail, string $value )

Changes a detail of the ticket to a new value.

Changes a detail of the ticket to a new value.

Never touches the backend; do not use for changes that you want to persist.

Parameters

$detail
The detail to change.
$value
The new detail value.
public
# change( string $detail, string $value )

Tracks that a detail of the ticket should change, but does not actually make the change until commit() is called.

Tracks that a detail of the ticket should change, but does not actually make the change until commit() is called.

Parameters

$detail
The detail to change.
$value
The new detail value.

See

Whups_Ticket::commit()
public
# commit( string $user = null, integer $transaction = null, boolean $notify = true )

Goes through a list of built-up changes and commits them to the backend.

Goes through a list of built-up changes and commits them to the backend.

This will send email updates by default, update the ticket log, etc.

Parameters

$user
<p>The Horde user of the changes to be made. Defaults to the current user.</p>
$transaction
<p>The transaction these changes are part of. Defaults to a new transaction.</p>
$notify
Send ticket notifications?

See

Whups_Ticket::change()
public
# delete( )

Deletes this ticket.

Deletes this ticket.

Throws

Whups_Exception
public
# addAttachment( string & $attachment_name, string $attachment_file )

Adds an attachment to this ticket.

Adds an attachment to this ticket.

Parameters

$attachment_name
The name of the attachment.
$attachment_file
<p>The temporary file containing the data to be stored.</p>

Throws

Whups_Exception
public
# deleteAttachment( string $attachment_name )

Removes an attachment from this ticket.

Removes an attachment from this ticket.

Parameters

$attachment_name
The name of the attachment.

Throws

Whups_Exception
public array
# listAllAttachments( )

Returns a list of all files that have been attached to this ticket, whether they still exist or not.

Returns a list of all files that have been attached to this ticket, whether they still exist or not.

Returns

array
The list of file attachments

Throws

Whups_Exception
public
# show( )

Redirects the browser to this ticket's view.

Redirects the browser to this ticket's view.

public string
# feedLink( )

Returns a tag for this ticket's feed.

Returns a tag for this ticket's feed.

Returns

string
A full tag.
public static integer
# addCommentPerms( integer $commentId, string $group )

Sets exclusive read permissions on a comment to a certain group.

Sets exclusive read permissions on a comment to a certain group.

Parameters

$commentId
The id of the comment to restrict.
$group
The group name to limit access by.

Returns

integer
The permission id.
public
# setDetails( Horde_Variables & $vars )

Sets all properties of the ticket necessary to display the TicketDetailsForm.

Sets all properties of the ticket necessary to display the TicketDetailsForm.

Parameters

$vars
The form variables object to set info in.
public
# notify( string $author, boolean $isNew, array $listeners = array() )

Notifies all appropriate people of the creation/update of this ticket.

Notifies all appropriate people of the creation/update of this ticket.

Parameters

$author
Who created/changed the ticket?
$isNew
<p>Is this a new ticket or a change to an existing one?</p>
$listeners
<p>The list of listener that should receive the notification, with user names as keys and user roles as values. If empty, the list will be created automatically.</p>
public
# toString( )

Returns a plain text representation of a ticket.

Returns a plain text representation of a ticket.

public
# __toString( )
public array
# addAttributes( )

Adds ticket attribute values to the ticket's details, and returns the list of attributes.

Adds ticket attribute values to the ticket's details, and returns the list of attributes.

Returns

array
List of ticket attribute hashes.
API documentation generated by ApiGen