API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsCommentHandler Class Reference
Inheritance diagram for XoopsCommentHandler:
Collaboration diagram for XoopsCommentHandler:

Public Member Functions

 create ($isNew=true)
 
 get ($id)
 
 insert (XoopsObject $comment)
 
 delete (XoopsObject $comment)
 
 getObjects (CriteriaElement $criteria=null, $id_as_key=false)
 
 getCount (CriteriaElement $criteria=null)
 
 deleteAll (CriteriaElement $criteria=null)
 
 getList (CriteriaElement $criteria=null)
 
 getByItemId ($module_id, $item_id, $order=null, $status=null, $limit=null, $start=0)
 
 getCountByItemId ($module_id, $item_id, $status=null)
 
 getTopComments ($module_id, $item_id, $order, $status=null)
 
 getThread ($comment_rootid, $comment_id, $status=null)
 
 updateByField (XoopsComment $comment, $field_name, $field_value)
 
 deleteByModule ($module_id)
 
- Public Member Functions inherited from XoopsObjectHandler
 __construct (XoopsDatabase $db)
 
 XoopsObjectHandler ($db)
 
 create ()
 
 get ($id)
 
 insert (XoopsObject $object)
 
 delete (XoopsObject $object)
 

Additional Inherited Members

- Data Fields inherited from XoopsObjectHandler
 $db
 

Member Function Documentation

◆ create()

create (   $isNew = true)

Create a XoopsComment

Parameters
bool$isNewFlag the object as "new"?
Returns
XoopsComment

◆ delete()

delete ( XoopsObject  $comment)

Delete a XoopsComment from the database

Parameters
XoopsObject | XoopsComment$commenta XoopsComment object
Returns
bool true on success, otherwise false

Reimplemented from XoopsObjectHandler.

◆ deleteAll()

deleteAll ( CriteriaElement  $criteria = null)

Delete multiple comments

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement
Returns
bool
Here is the caller graph for this function:

◆ deleteByModule()

deleteByModule (   $module_id)

Delete all comments for one whole module

Parameters
int$module_idID of the module
Returns
bool
Here is the call graph for this function:

◆ get()

get (   $id)

Retrieve a XoopsComment

Parameters
int$idID
Returns
XoopsComment XoopsComment, FALSE on fail

Reimplemented from XoopsObjectHandler.

◆ getByItemId()

getByItemId (   $module_id,
  $item_id,
  $order = null,
  $status = null,
  $limit = null,
  $start = 0 
)

Retrieves comments for an item

Parameters
int$module_idModule ID
int$item_idItem ID
string$orderSort order
int$statusStatus of the comment
int$limitMax num of comments to retrieve
int$startStart offset
Returns
array Array of XoopsComment objects
Here is the call graph for this function:

◆ getCount()

getCount ( CriteriaElement  $criteria = null)

Count Comments

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement
Returns
int Count
Here is the caller graph for this function:

◆ getCountByItemId()

getCountByItemId (   $module_id,
  $item_id,
  $status = null 
)

Gets total number of comments for an item

Parameters
int$module_idModule ID
int$item_idItem ID
int$statusStatus of the comment
Returns
array Array of XoopsComment objects
Here is the call graph for this function:

◆ getList()

getList ( CriteriaElement  $criteria = null)

Get a list of comments

Parameters
CriteriaElement$criteriaCriteriaElement
Returns
array Array of raw database records
Here is the call graph for this function:

◆ getObjects()

getObjects ( CriteriaElement  $criteria = null,
  $id_as_key = false 
)

Get some XoopsComments

Parameters
CriteriaElement | CriteriaCompo$criteria
bool$id_as_keyUse IDs as keys into the array?
Returns
array Array of XoopsComment objects
Here is the caller graph for this function:

◆ getThread()

getThread (   $comment_rootid,
  $comment_id,
  $status = null 
)

Retrieve a whole thread

Parameters
int$comment_rootid
int$comment_id
int$status
Returns
array Array of XoopsComment objects
Here is the call graph for this function:

◆ getTopComments()

getTopComments (   $module_id,
  $item_id,
  $order,
  $status = null 
)

Get the top XoopsComments

Parameters
int$module_id
int$item_id
string$order
int$status
Returns
array Array of XoopsComment objects
Here is the call graph for this function:

◆ insert()

insert ( XoopsObject  $comment)

Write a comment to database

Parameters
XoopsObject | XoopsComment$commenta XoopsComment object
Returns
bool true on success, otherwise false

Reimplemented from XoopsObjectHandler.

Here is the caller graph for this function:

◆ updateByField()

updateByField ( XoopsComment  $comment,
  $field_name,
  $field_value 
)

Update

Parameters
XoopsComment$commentXoopsComment object
string$field_nameName of the field
mixed$field_valueValue to write
Returns
bool
Here is the call graph for this function:

The documentation for this class was generated from the following file: