Comment

Extends\CActiveRecord

The followings are the available columns in table 'tbl_comment':

package

Default

Methods

Approves a comment.

approve()

attributeLabels

attributeLabels(): array

Response

array

customized attribute labels (name=>label)

This is invoked before the record is saved.

beforeSave(): boolean

Response

boolean

whether the record should be saved.

findRecentComments

findRecentComments( $limit = 10): array

Arguments

$limit

Response

array

the most recently added comments

getPendingCommentCount

getPendingCommentCount(): integer

Response

integer

the number of comments that are pending approval

getUrl

getUrl( $post = null): string

Arguments

$post

Response

string

the permalink URL for this comment

Returns the static model of the specified AR class.

model( $className = __CLASS__): static
static

Arguments

$className

Response

static

the static model class

relations

relations(): array

Response

array

relational rules.

rules

rules(): array

Response

array

validation rules for model attributes.

tableName

tableName(): string

Response

string

the associated database table name

Constants

STATUS_PENDING

STATUS_PENDING

STATUS_APPROVED

STATUS_APPROVED

Properties

id

id :integer

Type(s)

integer

content

content :string

Type(s)

string

status

status :integer

Type(s)

integer

create_time

create_time :integer

Type(s)

integer

author

author :string

Type(s)

string

email

email :string

Type(s)

string

url

url :string

Type(s)

string

post_id

post_id :integer

Type(s)

integer