Configuring GII


Before we can start using Gii, we have to configure it for use within our application.
At this point you probably know enough to guess we would do that in our main
application configuration file, protected/config/main.php. This is correct. To
configure Gii for use, open this file and add the following highlighted code to the
returned array:

return array(
‘basePath’=>dirname(__FILE__).DIRECTORY_SEPARATOR.’..’,
‘name’=>’My Web Application’,
// preloading ‘log’ component
‘preload’=>array(‘log’),
// autoloading model and component classes
‘import’=>array(
‘application.models.*’,
‘application.components.*’,
),
‘modules’=>array(
‘gii’=>array(
‘class’=>’system.gii.GiiModule’,
‘password’=>'[add_your_password_here]’,
),
),

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s