PHP Class common\models\PostComment

Inheritance: extends common\components\db\ActiveRecord
显示文件 Open project: iiyii/getyii Class Usage Examples

Public Properties

Property Type Description
$atUsers

Public Methods

Method Description
afterSave ( $insert, $changedAttributes )
attributeLabels ( )
beforeSave ( $insert )
findComment ( $id ) : array | null | ActiveRecord | static 通过ID获取指定评论
findCommentList ( $postId ) : static 评论列表
findDeletedComment ( $id ) : array | null | ActiveRecord 获取已经删除过的评论
findModel ( $id, string $condition = '' ) : array | null | ActiveRecord | static 通过ID获取指定评论
getLike ( )
getPost ( )
getTopic ( )
getUser ( )
isCurrent ( ) : boolean 自己写的评论
rules ( )
tableName ( )

Method Details

afterSave() public method

public afterSave ( $insert, $changedAttributes )

attributeLabels() public method

public attributeLabels ( )

beforeSave() public method

public beforeSave ( $insert )

findComment() public static method

通过ID获取指定评论
public static findComment ( $id ) : array | null | ActiveRecord | static
$id
return array | null | yii\db\ActiveRecord | static

findCommentList() public static method

评论列表
public static findCommentList ( $postId ) : static
$postId
return static

findDeletedComment() public static method

获取已经删除过的评论
public static findDeletedComment ( $id ) : array | null | ActiveRecord
$id
return array | null | yii\db\ActiveRecord

findModel() public static method

通过ID获取指定评论
public static findModel ( $id, string $condition = '' ) : array | null | ActiveRecord | static
$id
$condition string
return array | null | yii\db\ActiveRecord | static

getLike() public method

public getLike ( )

getPost() public method

public getPost ( )

getTopic() public method

public getTopic ( )

getUser() public method

public getUser ( )

isCurrent() public method

自己写的评论
public isCurrent ( ) : boolean
return boolean

rules() public method

public rules ( )

tableName() public static method

public static tableName ( )

Property Details

$atUsers public_oe property

public $atUsers