XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsCommentHandler Class Reference
Inheritance diagram for XoopsCommentHandler:
XoopsObjectHandler

Public Member Functions

create ($isNew=true)
 
get ($id)
 
 insert (&$comment)
 
 delete (&$comment)
 
getObjects ($criteria=null, $id_as_key=false)
 
 getCount ($criteria=null)
 
 deleteAll ($criteria=null)
 
getList ($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 (&$comment, $field_name, $field_value)
 
 deleteByModule ($module_id)
 
 getChildObjects (&$comment)
 
 deleteWithChild (&$comment)
 
- Public Member Functions inherited from XoopsObjectHandler
 __construct (&$db)
 
create ()
 

Additional Inherited Members

- Data Fields inherited from XoopsObjectHandler
 $db
 

Detailed Description

Definition at line 110 of file comment.php.

Member Function Documentation

◆ create()

& create ( $isNew = true)

Create a XoopsComment

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

Definition at line 120 of file comment.php.

◆ delete()

delete ( & $comment)

Delete a XoopsComment from the database

Parameters
object&$comment
Returns
bool

Reimplemented from XoopsObjectHandler.

Definition at line 220 of file comment.php.

◆ deleteAll()

deleteAll ( $criteria = null)

Delete multiple comments

Parameters
object$criteriaCriteriaElement
Returns
bool

Definition at line 296 of file comment.php.

◆ deleteByModule()

deleteByModule ( $module_id)

Delete all comments for one whole module

Parameters
int$module_idID of the module
Returns
bool

Definition at line 438 of file comment.php.

◆ deleteWithChild()

deleteWithChild ( & $comment)

Definition at line 481 of file comment.php.

◆ get()

& get ( $id)

Retrieve a XoopsComment

Parameters
int$idID
Returns
object XoopsComment, FALSE on fail

Reimplemented from XoopsObjectHandler.

Definition at line 136 of file comment.php.

◆ 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

Definition at line 337 of file comment.php.

◆ getChildObjects()

getChildObjects ( & $comment)

Change a value in multiple comments

Parameters
$comment
Returns
array

Definition at line 464 of file comment.php.

◆ getCount()

getCount ( $criteria = null)

Count Comments

Parameters
object$criteriaCriteriaElement
Returns
int Count

Definition at line 276 of file comment.php.

◆ 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
int Array of XoopsComment objects

Definition at line 363 of file comment.php.

◆ getList()

& getList ( $criteria = null)

Get a list of comments

Parameters
object$criteriaCriteriaElement
Returns
array Array of raw database records

Definition at line 315 of file comment.php.

◆ getObjects()

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

Get some XoopsComments

Parameters
object$criteria
bool$id_as_keyUse IDs as keys into the array?
Returns
array Array of XoopsComment objects

Definition at line 240 of file comment.php.

◆ 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

Definition at line 406 of file comment.php.

◆ getTopComments()

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

Get the top XoopsComments

Parameters
int$module_id
int$item_id
strint$order
int$status
Returns
array Array of XoopsComment objects

Definition at line 384 of file comment.php.

◆ insert()

insert ( & $comment)

Write a comment to database

Parameters
object&$comment
Returns
bool

Reimplemented from XoopsObjectHandler.

Definition at line 161 of file comment.php.

◆ updateByField()

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

Update

Parameters
object&$commentXoopsComment object
string$field_nameName of the field
mixed$field_valueValue to write
Returns
bool

Definition at line 425 of file comment.php.


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