CommentController

Extends\Controller

Controller is the customized base controller class.

All controller classes for this application should extend from this base class.

package

Default

Methods

Specifies the access control rules.

accessRules(): array

This method is used by the 'accessControl' filter.

Response

array

access control rules

Approves a particular comment.

actionApprove()

If approval is successful, the browser will be redirected to the comment index page.

Deletes a particular model.

actionDelete()

If deletion is successful, the browser will be redirected to the 'index' page.

Lists all models.

actionIndex()

Updates a particular model.

actionUpdate()

If update is successful, the browser will be redirected to the 'view' page.

filters

filters(): array

Response

array

action filters

Returns the data model based on the primary key given in the GET variable.

loadModel()

If the data model is not found, an HTTP exception will be raised.

Properties

the default layout for the controller view. Defaults to 'column1', meaning using a single column layout. See 'protected/views/layouts/column1.php'.

layout :string
inherited
var

the default layout for the controller view. Defaults to 'column1', meaning using a single column layout. See 'protected/views/layouts/column1.php'.

Type(s)

string

the currently loaded data model instance.

_model :\CActiveRecord
var

the currently loaded data model instance.

Type(s)

\CActiveRecord

context menu items. This property will be assigned to {@link CMenu::items}.

menu :array
inherited
var

context menu items. This property will be assigned to {@link CMenu::items}.

Type(s)

array

the breadcrumbs of the current page. The value of this property will be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links} for more details on how to specify this property.

breadcrumbs :array
inherited
var

the breadcrumbs of the current page. The value of this property will be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links} for more details on how to specify this property.

Type(s)

array