Skip to content

Commit 786509b

Browse files
committed
refactored application to basic layout
- using an admin module as backend entry point - using themes and module config for applying backend theme
1 parent 0e8f36d commit 786509b

File tree

145 files changed

+629
-3816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+629
-3816
lines changed

frontend/assets/AppAsset.php assets/AppAsset.php

+15-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @license http://www.yiiframework.com/license/
66
*/
77

8-
namespace frontend\assets;
8+
namespace app\assets;
99

1010
use yii\web\AssetBundle;
1111

@@ -17,7 +17,7 @@ class AppAsset extends AssetBundle
1717
{
1818
//public $basePath = '@webroot';
1919
//public $baseUrl = '@web';
20-
public $sourcePath = '@frontend/assets/web';
20+
public $sourcePath = '@app/assets/web';
2121

2222
public $css = [
2323
'css/app.css',
@@ -30,4 +30,17 @@ class AppAsset extends AssetBundle
3030
// set bundle to false in assetManager config
3131
'yii\web\YiiAsset',
3232
];
33+
34+
public function init(){
35+
parent::init();
36+
\Yii::$app->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = false;
37+
}
38+
39+
public function registerAssetFiles($view) {
40+
#$view->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = ['css'=>false];
41+
#var_dump($view->getAssetManager()->bundles);exit;
42+
parent::registerAssetFiles($view);
43+
#$view->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = false;
44+
45+
}
3346
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

backend/config/bootstrap.php

-1
This file was deleted.

backend/config/main.php

-58
This file was deleted.

backend/views/layouts/main.php

-71
This file was deleted.

backend/views/site/index.php

-50
This file was deleted.

backend/web/favicon.ico

-9.9 KB
Binary file not shown.

backend/web/index-test.php

-21
This file was deleted.

backend/web/index.php

-18
This file was deleted.

backend/web/robots.txt

-2
This file was deleted.
File renamed without changes.

console/controllers/AppController.php commands/AppController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ public function actionRunTests()
156156
*/
157157
public function actionClearAssets($app = null)
158158
{
159-
$frontendAssets = \Yii::getAlias('@frontend/web/assets');
160-
$backendAssets = \Yii::getAlias('@backend/web/assets');
159+
$frontendAssets = \Yii::getAlias('@app/web/assets');
160+
### TODO $backendAssets = \Yii::getAlias('@backend/web/assets');
161161

162162
// Matches from 7-8 char folder names, the 8. char is optional
163163
$matchRegex = '"^[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]\?[a-z0-9]$"';

common/config/.gitignore

-1
This file was deleted.

common/config/bootstrap.php

-6
This file was deleted.

common/config/main.php

-55
This file was deleted.

common/mail/layouts/html.php

-22
This file was deleted.

common/mail/passwordResetToken.php

-14
This file was deleted.

common/models/.gitkeep

-1
This file was deleted.
File renamed without changes.

config/bootstrap.php

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
Yii::setAlias('@app', dirname(__DIR__).'/..');

common/config/env.php config/env.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use \Dotenv;
44

5-
Dotenv::load(__DIR__.'/../..');
5+
Dotenv::load(__DIR__.'/..');
66

77
Dotenv::required('YII_DEBUG',["","0","1","true"]);
88
Dotenv::required('YII_ENV',['dev','prod','test']);

0 commit comments

Comments
 (0)