PHP Класс common\models\PostComment

Наследование: extends common\components\db\ActiveRecord
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$atUsers

Открытые методы

Метод Описание
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 ( )

Описание методов

afterSave() публичный Метод

public afterSave ( $insert, $changedAttributes )

attributeLabels() публичный Метод

public attributeLabels ( )

beforeSave() публичный Метод

public beforeSave ( $insert )

findComment() публичный статический Метод

通过ID获取指定评论
public static findComment ( $id ) : array | null | ActiveRecord | static
$id
Результат array | null | yii\db\ActiveRecord | static

findCommentList() публичный статический Метод

评论列表
public static findCommentList ( $postId ) : static
$postId
Результат static

findDeletedComment() публичный статический Метод

获取已经删除过的评论
public static findDeletedComment ( $id ) : array | null | ActiveRecord
$id
Результат array | null | yii\db\ActiveRecord

findModel() публичный статический Метод

通过ID获取指定评论
public static findModel ( $id, string $condition = '' ) : array | null | ActiveRecord | static
$id
$condition string
Результат array | null | yii\db\ActiveRecord | static

getLike() публичный Метод

public getLike ( )

getPost() публичный Метод

public getPost ( )

getTopic() публичный Метод

public getTopic ( )

getUser() публичный Метод

public getUser ( )

isCurrent() публичный Метод

自己写的评论
public isCurrent ( ) : boolean
Результат boolean

rules() публичный Метод

public rules ( )

tableName() публичный статический Метод

public static tableName ( )

Описание свойств

$atUsers публичное свойство

public $atUsers