Assets 2.0.0
2021-11-04
604次浏览
Version 2.0.0 of assets package was released improving public API for more convenient use.
Previously you had to specify assets registered as array:
$assetManager->register([\App\Assets\MainAsset::class]);
but since the case of registering multiple assets is not that common, the method now accepts a single asset class:
$assetManager->register(\App\Assets\MainAsset::class);
Additional method was added for registering multiple assets at once:
$assetManager->registerMany([
\App\Assets\BootstrapAsset::class,
\App\Assets\MainAsset::class,
]);
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- view
- auth client
- bootstrap
- html
- release
- apidoc
- redis
- Yii 2.0
- mongodb
- Yii 1.1
- extensions
- mailer
- gii
- console
- runner
- http 客户端
- validation
- twig
- queue
- http
- translator
- cache
- hydrator
- widget
- sphinx
- error handler
- config
- db
- log
- assets
- symfonymailer
- router
- elasticsearch
- swagger
- swiftmailer
- 图书
- imagine
- definitions
- user
- IDE
- csrf
- i18n
- fastroute
- rbac
- logging