IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Atme
  • Comment
  • Feed
  • FeedData
  • FeedDigg
  • Message
  • MessageContent
  • MessageList
  • MessageUser
  • Notify
  • NotifyEmail
  • NotifyMessage
  • NotifySms
  • UserData

Class Comment

CActiveRecord
Extended by application\core\model\Model
Extended by application\modules\message\model\Comment
Namespace: application\modules\message\model
Located at system/modules/message/model/Comment.php

Methods summary

public static
# model( $className = __CLASS__ )
public
# tableName( )
public array
# fetchReplyIdByCid( integer $cid )

获取某条评论下的回复ID

获取某条评论下的回复ID

Parameters

$cid

Returns

array
public boolean
# addComment( array $data, boolean $forApi = false, array $notCount = false, $lessUids = null )

添加评论操作

添加评论操作

Parameters

$data
评论数据
$forApi
$notCount 是否统计到未读评论
$notCount
$lessUids 除去@用户ID
$lessUids

Returns

boolean
是否添加评论成功
public boolean
# deleteComment( array $ids, integer $uid = null, array $module = '' )

删除评论

删除评论

Parameters

$ids
评论ID数组
$uid
用户UID
$module
评论所属应用 积分加减时用到

Returns

boolean
是否删除评论成功
public array
# getCommentList( mixed $map = null, string $order = 'cid ASC', integer $limit = 10, boolean $offset = 0, $isReply = false )

获取评论列表,已在后台被使用

获取评论列表,已在后台被使用

Parameters

$map
查询条件
$order
排序条件,默认为cid ASC
$limit
结果集数目,默认为10
$offset
$isReply 是否显示回复信息
$isReply

Returns

array
评论列表信息
public array
# getCommentInfo( integer $id, boolean $source = true )

获取评论信息

获取评论信息

Parameters

$id
评论ID
$source
是否显示资源信息,默认为true

Returns

array
获取评论信息
public integer
# countCommentByMap( array $map )

根据条件数组统计评论/回复条数

根据条件数组统计评论/回复条数

Parameters

$map

Returns

integer
public array
# doEditComment( integer $id, string $type )

评论处理方法,包含彻底删除、假删除与恢复功能

评论处理方法,包含彻底删除、假删除与恢复功能

Parameters

$id
评论ID
$type
操作类型,delComment假删除、deleteComment彻底删除、commentRecover恢复

Returns

array
评论处理后,返回的数组操作信息
public boolean
# commentRecover( integer $id )

评论恢复操作

评论恢复操作

Parameters

$id
评论ID

Returns

boolean
评论是否恢复成功

Methods inherited from application\core\model\Model

add(), beforeDelete(), create(), deleteByPk(), fetch(), fetchAll(), fetchAllByAttributes(), fetchAllByPk(), fetchAllSortByPk(), fetchByAttributes(), fetchByPk(), fetchCache(), fetchCaches(), getCacheKey(), getIsAllowCache(), getMaxId(), getModelClass(), init(), modify(), remove(), updateAll(), updateByPk()

Properties summary

Properties inherited from application\core\model\Model

$allowCache, $cacheLife

IBOS open source API documentation generated by ApiGen