handles functions related to replies on tickets.
More...
Public Member Functions |
| __construct () |
| A constructor.
|
| set ($values) |
| sets the object's attributes.
|
| create () |
| creates a new 'ticket_reply' entry.
|
| load_With_TReplyId ($id) |
| loads the object's attributes.
|
| update () |
| updates a ticket_reply entry based on the objects attributes.
|
| getTicket () |
| get ticket attribute of the object.
|
| getContent () |
| get content attribute of the object.
|
| getAuthor () |
| get author attribute of the object.
|
| getTimestamp () |
| get timestamp attribute of the object.
|
| getTReplyId () |
| get tReplyId attribute of the object.
|
| getHidden () |
| get hidden attribute of the object.
|
| setTicket ($t) |
| set ticket attribute of the object.
|
| setContent ($c) |
| set content attribute of the object.
|
| setAuthor ($a) |
| set author attribute of the object.
|
| setTimestamp ($t) |
| set timestamp attribute of the object.
|
| setTReplyId ($i) |
| set tReplyId attribute of the object.
|
| setHidden ($h) |
| set hidden attribute of the object.
|
Static Public Member Functions |
static | constr_TReplyId ($id) |
| return constructed element based on TReplyId.
|
static | getRepliesOfTicket ($ticket_id, $view_as_admin) |
| return all replies on a specific ticket.
|
static | createReply ($content, $author, $ticket_id, $hidden, $ticket_creator) |
| creates a new reply on a ticket.
|
Private Attributes |
| $tReplyId |
| The id of the reply.
|
| $ticket |
| the ticket id related to the reply
|
| $content |
| the content of the reply
|
| $author |
| The id of the user that made the reply.
|
| $timestamp |
| The timestamp of the reply.
|
| $hidden |
| indicates if reply should be hidden for normal users or not
|
Detailed Description
handles functions related to replies on tickets.
- Author:
- Daan Janssens, mentored by Matthew Lagoe
Constructor & Destructor Documentation
A constructor.
Empty constructor
Member Function Documentation
return constructed element based on TReplyId.
- Parameters:
-
$id | the Id the reply we want to load. |
- Returns:
- the loaded object.
creates a new 'ticket_reply' entry.
this method will use the object's attributes for creating a new 'ticket_reply' entry in the database (the now() function will create the timestamp).
static createReply |
( |
$ |
content, |
|
|
$ |
author, |
|
|
$ |
ticket_id, |
|
|
$ |
hidden, |
|
|
$ |
ticket_creator |
|
) |
| [static] |
creates a new reply on a ticket.
Creates a ticket_content entry and links it with a new created ticket_reply, a log entry will be written about this. In case the ticket creator replies on a ticket, he will set the status by default to 'waiting on support'.
- Parameters:
-
$content | the content of the reply |
$author | the id of the reply creator. |
$ticket_id | the id of the ticket of which we want the replies. |
$hidden | should be 0 or 1 |
$ticket_creator | the ticket's starter his id. |
get author attribute of the object.
get content attribute of the object.
get hidden attribute of the object.
return all replies on a specific ticket.
- Parameters:
-
$ticket_id | the id of the ticket of which we want the replies. |
$view_as_admin | if the browsing user is an admin/mod it should be 1, this will also show the hidden replies. |
- Returns:
- an array with ticket_reply objects (beware the author and content are objects on their own, not integers!)
get ticket attribute of the object.
get timestamp attribute of the object.
The output format is defined by the Helpers class function, outputTime().
get tReplyId attribute of the object.
loads the object's attributes.
loads the object's attributes by giving a ticket_reply's id.
- Parameters:
-
$id | the id of the ticket_reply that should be loaded |
sets the object's attributes.
- Parameters:
-
$values | should be an array. |
set author attribute of the object.
- Parameters:
-
set content attribute of the object.
- Parameters:
-
$c | integer id of the ticket_content entry |
set hidden attribute of the object.
- Parameters:
-
set ticket attribute of the object.
- Parameters:
-
$t | integer id of the ticket |
set timestamp attribute of the object.
- Parameters:
-
set tReplyId attribute of the object.
- Parameters:
-
$i | integer id of the ticket_reply |
updates a ticket_reply entry based on the objects attributes.
Field Documentation
The id of the user that made the reply.
indicates if reply should be hidden for normal users or not
the ticket id related to the reply
The timestamp of the reply.
The documentation for this class was generated from the following file:
- /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_reply.php