mihaildev / yii2-view-replacer
Yii2 视图替换器
0.0.2
2016-05-18 11:03 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: ~2.0.0
Requires (Dev)
This package is not auto-updated.
Last update: 2024-09-10 22:49:52 UTC
README
安装
"mihaildev/yii2-view-replacer": "*"
使用
假设您想使用第三方用户模块,但管理员部分不符合您的需求!您可以创建自己的扩展,该扩展仅添加正确的模板替换!
class Bootstrap implements BootstrapInterface { /** * Bootstrap method to be called during application bootstrap stage. * @param Application $app the application currently running */ public function bootstrap($app) { ViewReplacer::replace('@app/some/path', '@app/to/path'); ViewReplacer::replace([ '@app/some/path' => '@app/to/path', '@app/some/path' => [ '@app/to/path', '@app/to/path' ] ]); } }