PHP Class ThemeController

Author: Yoshitaka Kitagawa
Inheritance: extends AppApiController
Show file Open project: yinhe/yincart Class Usage Examples

Public Properties

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

Public Methods

Method Description
accessRules ( ) : array Specifies the access control rules.
actionAdmin ( ) Manages all models.
actionCreate ( ) Creates a new model.
actionDelete ( integer $id ) Deletes a particular model.
actionIndex ( ) Lists all models.
actionUpdate ( integer $id ) Updates a particular model.
actionView ( integer $id ) Displays a particular model.
filters ( ) : array
loadModel ( $id ) Returns the data model based on the primary key given in the GET variable.

Protected Methods

Method Description
performAjaxValidation ( $model ) Performs the AJAX validation.

Method Details

accessRules() public method

This method is used by the 'accessControl' filter.
public accessRules ( ) : array
return array access control rules

actionAdmin() public method

Manages all models.
public actionAdmin ( )

actionCreate() public method

If creation is successful, the browser will be redirected to the 'view' page.
public actionCreate ( )

actionDelete() public method

If deletion is successful, the browser will be redirected to the 'admin' page.
public actionDelete ( integer $id )
$id integer the ID of the model to be deleted

actionIndex() public method

Lists all models.
public actionIndex ( )

actionUpdate() public method

If update is successful, the browser will be redirected to the 'view' page.
public actionUpdate ( integer $id )
$id integer the ID of the model to be updated

actionView() public method

Displays a particular model.
public actionView ( integer $id )
$id integer the ID of the model to be displayed

filters() public method

public filters ( ) : array
return array action filters

loadModel() public method

If the data model is not found, an HTTP exception will be raised.
public loadModel ( $id )

performAjaxValidation() protected method

Performs the AJAX validation.
protected performAjaxValidation ( $model )

Property Details

$layout public property

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