PHP Class frontend\modules\topic\models\Topic

Inheritance: extends common\models\Post
Show file Open project: iiyii/getyii Class Usage Examples

Public Properties

Property Type Description
$atUsers
$cc CC 协议

Public Methods

Method Description
addTags ( array $tags ) : boolean 添加标签
afterSave ( $insert, $changedAttributes )
beforeSave ( $insert )
findDeletedTopic ( $id ) : array | Topic | null | ActiveRecord 获取已经删除过的话题
findModel ( $id, string $condition = '' ) : array | null | ActiveRecord | static 通过ID获取指定话题
findTopic ( $id ) : array | Topic | null | ActiveRecord 通过ID获取指定话题
getFavorite ( )
getFollow ( )
getFollower ( ) : static 获取关注者
getHate ( )
getLike ( )
getThanks ( )
lastCommentToUpdate ( string $username = '' ) : boolean 最后回复更新

Method Details

addTags() public method

添加标签
public addTags ( array $tags ) : boolean
$tags array
return boolean

afterSave() public method

public afterSave ( $insert, $changedAttributes )

beforeSave() public method

public beforeSave ( $insert )

findDeletedTopic() public static method

获取已经删除过的话题
public static findDeletedTopic ( $id ) : array | Topic | null | ActiveRecord
$id
return array | Topic | null | 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

findTopic() public static method

通过ID获取指定话题
public static findTopic ( $id ) : array | Topic | null | ActiveRecord
$id
return array | Topic | null | ActiveRecord

getFavorite() public method

public getFavorite ( )

getFollow() public method

public getFollow ( )

getFollower() public method

获取关注者
public getFollower ( ) : static
return static

getHate() public method

public getHate ( )

getLike() public method

public getLike ( )

getThanks() public method

public getThanks ( )

lastCommentToUpdate() public method

最后回复更新
public lastCommentToUpdate ( string $username = '' ) : boolean
$username string
return boolean

Property Details

$atUsers public property

public $atUsers

$cc public property

CC 协议
public $cc