我在前端https://github.com/Singrana/thememanager安装此插件用于更改主题 像手册一样安装。
在我的前端/ config / main.php
中'components' => [
'view'=>
[
'theme' =>
[
'class' => 'singrana\thememanager\components\ThemeManager',
'current' => 'siteeee',
'themes' =>
[
'site' =>
[
'pathMap' =>
[
'@app/views' => '@frontend/themes/site',
'@app/views/layouts' => '@frontend/themes/site/layouts',
],
//'defaultLayout' => '//inner',
],
'siteeee' =>
[
'pathMap' =>
[
'@app/views' => '@frontend/themes/siteeee',
'@app/views/layouts' => '@frontend/themes/siteeee/layouts',
],
//'defaultLayout' => '//inner',
],
],
],
],
],
但我需要像手动一样调用\Yii::$app->view->theme->changeTheme('themeName');
来更改主题,我该如何在后端执行此操作?