IP.Board  3.3.0
supportReply Class Reference

Model for Support Request Replies. More...

Public Member Functions

 __get ($key)
 __set ($key, $value)
 save ($request, $isNewRequest=FALSE, $notifyPrefs=array())
 sendNotification ($newRequest=FALSE)

Static Public Member Functions

static create ($type, $member, $message, $postKey=NULL)
static makeReplySafeForAdminCP ($message)

Data Fields

const REPLY_ALTCONTACT = 'a'
const REPLY_EMAIL = 'e'
const REPLY_HIDDEN = 'h'
const REPLY_MEMBER = 'm'
const REPLY_PUBLIC = '*'
const REPLY_STAFF = 's'

Detailed Description

Model for Support Request Replies.


Member Function Documentation

__get ( key)

Get property

Parameters:
string$keyKey - column name from nexus_support_requests without the "reply_" prefix
Returns:
string|int Value
__set ( key,
value 
)

Set property

Parameters:
string$keyKey - column name from nexus_support_requests without the "r_" prefix
string | int$valueValue
Returns:
void
See also:
create()
static create ( type,
member,
message,
postKey = NULL 
) [static]

Create new support request reply

Parameters:
string$typeShould be one of:
  • supportReply::REPLY_PUBLIC If reply is being made by a member on the site
  • supportReply::REPLY_STAFF If reply is being made by staff member
  • supportReply::REPLY_HIDDEN If is hidden reply
  • supportReply::REPLY_EMAIL If reply is being received by Email
int$memberMember ID making reply
string$messageMessage
string$postKeyPost key used for parsing attachments
Returns:
supportReply supportReply object

Example Usage:

 $reply = supportReply::create( supportReply::REPLY_MEMBER, 1, "Message" )->save( supportRequest::load( 1 ) );
See also:
set_type
set_post
static makeReplySafeForAdminCP ( message) [static]

Make text safe for ACP view

Parameters:
string$messageMessage
Returns:
string Safe message
save ( request,
isNewRequest = FALSE,
notifyPrefs = array() 
)

Insert into database

Parameters:
supportRequest$requestsupportRequest object of request to add reply to
bool$isNewRequestIf true, this is a new request - if false, is a reply to an existing request
array$notifyPrefsWho to notify about reply - list of keys from $supportRequest->notify which we're sending to
Returns:
int Reply ID number

Example Usage:

 $reply = supportReply::create( supportReply::REPLY_MEMBER, 1, "Message" )->save( supportRequest::load( 1 ) );
Exceptions:
Exception
  • NO_PERMISSION (Member does not have permission to reply to this support request)
sendNotification ( newRequest = FALSE)

Send Notification to a member about a staff reply

Parameters:
bool$isNewRequestIf true, this is a new request - if false, is a reply to an existing request
Returns:
void

Field Documentation

const REPLY_PUBLIC = '*'

Reply Type Constants


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables