\CGClientTicketsticket

This class defines a single ticket. A ticket has numerous properties, and one or more messages.

Summary

Methods
Properties
Constants
private_fill()
get_dataref()
get_linkdefinition()
load_by_id()
validate()
save()
delete()
$owner
$alert_group
$status
$priority
$e_key1
$e_key2
$e_key3
$id
$created
$modified
STATUS_OPEN
STATUS_CLOSED
STATUS_EXPIRED
PRIORITY_HIGH
PRIORITY_NORMAL
PRIORITY_LOW
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

STATUS_OPEN

STATUS_OPEN

STATUS_CLOSED

STATUS_CLOSED

STATUS_EXPIRED

STATUS_EXPIRED

PRIORITY_HIGH

PRIORITY_HIGH

PRIORITY_NORMAL

PRIORITY_NORMAL

PRIORITY_LOW

PRIORITY_LOW

Properties

$owner

$owner : int

The owner of the message. Messages can only be owned by FEU users, and therefore the value must be positive.

Type

int

$alert_group

$alert_group : int

The admin group id (expressed as a negative number) of the admin group that gets alerted when the owner of the ticket responsds.

Type

int

$status

$status : string

The status of the message.

Type

string

$priority

$priority : string

The priority of the message.

Type

string

$e_key1

$e_key1 : string

Used for perparing DataLinks and LinkDefinitions this is the first of three keys used to uniquely idetify this ticket.

Type

string

$e_key2

$e_key2 : string

Used for perparing DataLinks and LinkDefinitions this is the second of three keys used to uniquely idetify this ticket.

Type

string

$e_key3

$e_key3 : string

Used for perparing DataLinks and LinkDefinitions this is the third of three keys used to uniquely idetify this ticket.

Type

string

$id

$id : int

The unique id of this ticket.

Type

int

$created

$created : int

The unix timestamp representing when this ticket was first saved to the database.

Type

int

$modified

$modified : int

The unix timestamp representing when this ticket was last saved to the database.

Type

int

Methods

private_fill()

private_fill(array $data)

Fill this object from array data.

Parameters

array $data

get_dataref()

get_dataref() : \CGExtensions\LinkDefinition\DataRef

Get a dataref object for this object.

Returns

\CGExtensions\LinkDefinition\DataRef

get_linkdefinition()

get_linkdefinition() : \CGExtensions\LinkDefinition

A callback method to generate a link definition (an object defining a link) to view this object.

Returns

\CGExtensions\LinkDefinition

load_by_id()

load_by_id(int $id) : \CGClientTickets\ticket

Load the specified ticket by its id.

Parameters

int $id

The ticket id.

Returns

\CGClientTickets\ticket

validate()

validate()

Validate the contents of this object before saving.

This method will throw exceptions if an error occurs.

save()

save()

Save this object to the database.

delete()

delete()

Delete the current object from the database.

An exception will be thrown if the object has not already been saved to the database. After success the object id is reset, and the object is ready to be resaved.