Controller is the customized base controller class.

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

 Methods

Manages all models.

actionAdmin() 

Creates a new model.

actionCreate() 

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

Deletes a particular model.

actionDelete(integer $id) 

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

Parameters

$id

integer

the ID of the model to be deleted

Lists all models.

actionIndex() 

Updates a user's password. User must be logged in for this action to happen.

actionPass(integer $id) 

Also restricts accessing other users' passwords

Parameters

$id

integer

the ID of the model to be updated

Resets user's password and emails them their new password Admin access only

actionResetPassword($id) 

Parameters

$id

Exceptions

\CHttpException

Updates a particular model.

actionUpdate(integer $id) 

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

Parameters

$id

integer

the ID of the model to be updated

Displays a particular model.

actionView(integer $id) 

Parameters

$id

integer

the ID of the model to be displayed

filters()

filters() : array

Returns

arrayaction filters

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

loadModel(integer $id) 

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

Parameters

$id

integer

the ID of the model to be loaded

Performs the AJAX validation.

performAjaxValidation(\CModel $model) 

Parameters

$model

\CModel

the model to be validated

Generates a random string of letter followed by numbers for use in resetting passwords.

randString() : string

Returns

string

 Properties

 

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

inherited_from \Controller::$$breadcrumbs
 

the default layout for the views. Defaults to '//layouts/column2', meaning using two-column layout. See 'protected/views/layouts/column2.php'.

$layout : string

 

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

$menu : array
Inherited

inherited_from \Controller::$$menu