Skip to content

Instantly share code, notes, and snippets.

@DrMabuse23
Created January 3, 2014 09:29
Show Gist options
  • Save DrMabuse23/8235278 to your computer and use it in GitHub Desktop.
Save DrMabuse23/8235278 to your computer and use it in GitHub Desktop.
<?php
/**
*
* main.php configuration file
*
* @author Pascal Brewing <[email protected]>
* @link http://www.pascal-brewing.de
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
defined('APP_CONFIG_NAME') or define('APP_CONFIG_NAME', 'main');
use Yiinitializr\Helpers\ArrayX;
// web application configuration
return array(
'name' => 'Net-App',
'defaultController' => 'layout_manager/layout/admin',
// path aliases
'aliases' => array(
'bootstrap' => dirname(__FILE__) . '/../lib/vendor/drmabuse/yii-bootstrap-3-module',
'chartjs' => dirname(__FILE__) . '/../lib/vendor/drmabuse/yii-bootstrap-3-module/extensions/yii-chartjs-master',
'galleryManager' => dirname(__FILE__) . '/../modules/yii-gallery-manager',
'yii-image' => dirname(__FILE__) . '/../lib/vendor/z_bodya/yii-image',
'blog' => dirname(__FILE__) . '/../modules/yii-blog-module',
'yiiplugin' => dirname(__FILE__) . '/../modules/yiistrap-plugins',
'menu' => dirname(__FILE__) . '/../modules/pb_menu',
'Zend' => dirname(__FILE__) . '/../lib/vendor/zendframework',
),
'import' => array(
'application.components.*',
'bootstrap.*',
'bootstrap.components.*',
'bootstrap.models.*',
'bootstrap.controllers.*',
'bootstrap.helpers.*',
'bootstrap.widgets.*',
'bootstrap.extensions.*',
'blog.models.*',
'galleryManager.behaviors.*',
'chartjs.*',
'chartjs.widgets.*',
'chartjs.components.*',
'galleryManager.models.*',
'yii-image.Image',
'yiiplugin.widgets.*',
'yiiplugin.components.*',
'menu.*',
'menu.models.*',
'menu.widgets.*',
'menu.components.*',
'menu.controllers.*',
'menu.extensions.*',
'Zend.*',
'application.modules.youtube_app.models.*',
),
// application behaviors
'behaviors' => array(),
// controllers mappings
'controllerMap' => array(
'mediamanager' => array(
'class' => 'galleryManager.GalleryController'
)
),
// application modules
'modules' => array(
'bootstrap' => array(
'class' => 'bootstrap.BootStrapModule'
),
'blog' => array(
'class' => 'blog.BlogAdminModule'
),
'menu' => array(
'class' => 'menu.PbMenuModule'
),
'youtube_app',
'layout_manager' => array(
'class' => 'application.modules.layout_manager.LayoutManagerModule'
),
'facebook' => array(
'class' => 'application.modules.oagmFbApps.OagmFbAppsModule'
),
),
// application components
'components' => array(
'layoutHandler' => array(
'class' => 'application.components.LayoutHandler'
),
'bsHtml' => array(
'class' => 'bootstrap.components.BSHtml'
),
'chartjs'=>array(
'class' => 'chartjs.components.ChartJs'
),
'yiiplugin' => array(
'class' => 'yiiplugin.components.YiiStrapPlugin'
),
'menu' => array(
'class' => 'menu.components.MenuPlugin'
),
'urlManager' => array(
// uncomment the following if you have enabled Apache's Rewrite module.
// 'urlFormat' => 'path',
'showScriptName' => false,
'rules' => array(
// default rules
'doc' => 'site/doc',
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
),
'image'=>array(
'class'=>'yii-image.CImageComponent',
'driver'=>'GD',
),
'user' => array(
'allowAutoLogin' => true,
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'clientScript' => array(
'coreScriptPosition' => 2 //https://github.com/yiisoft/yii/blob/1.1.14/framework/web/CClientScript.php#L20 POS_END
),
'blogplugin' => array(
'class' => 'blog.components.BlogPlugin'
),
),
// application parameters
'params' => array(
'version' => ' Version 0.0.1 ',
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment