\SiteController

Controller is the customized base controller class.

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

Summary

Methods
Properties
Constants
init()
actions()
actionIndex()
actionError()
actionContact()
actionLogin()
actionLogout()
$layout
$menu
$breadcrumbs
No constants found
hasAccess()
$mainMenu
$subMenu
$mainEMenu
$subEMenu
N/A
getDefaultRoute()
getTree()
No private properties found
N/A

Properties

$layout

$layout : string

Type

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

$menu

$menu : array

Type

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

$breadcrumbs

$breadcrumbs : array

Type

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.

$mainMenu

$mainMenu : 

Type

$subMenu

$subMenu : 

Type

$mainEMenu

$mainEMenu : 

Type

$subEMenu

$subEMenu : 

Type

Methods

init()

init() 

actions()

actions() 

Declares class-based actions.

actionIndex()

actionIndex() 

This is the default 'index' action that is invoked when an action is not explicitly requested by users.

actionError()

actionError() 

This is the action to handle external exceptions.

actionContact()

actionContact() 

Displays the contact page

actionLogin()

actionLogin() 

Displays the login page

actionLogout()

actionLogout() 

Logs out the current user and redirect to homepage.

hasAccess()

hasAccess(\CAction  $action) : boolean

Check whether user has access to action or not.

Parameters

\CAction $action

Returns

boolean —

true if has access

getDefaultRoute()

getDefaultRoute(\type  $menu) : boolean

Parameters

\type $menu

Returns

boolean

getTree()

getTree(\type  $items) : \type

Parameters

\type $items

Returns

\type