powerkernel / yii2-flag-icon-css
为 Yii2 的 flag-icon-css 扩展
1.0.2
2023-05-01 15:10 UTC
Requires
- bower-asset/flag-icon-css: *
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-08-30 01:50:52 UTC
README
为 Yii2 的 flag-icon-css 扩展
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一:
php composer.phar require --prefer-dist powerkernel/yii2-flag-icon-css "*"
或将以下内容添加到您的 composer.json
文件的 require 部分:
"powerkernel/yii2-flag-icon-css": "*"
```json
用法
安装扩展后,只需在您的代码中使用即可:
<?= \powerkernel\flagiconcss\Flag::widget([ 'tag' => 'span', // flag tag 'country' => 'xx', // where xx is the ISO 3166-1-alpha-2 code of a country, 'squared' => false, // set to true if you want to have a squared version flag 'options' => [] // tag html options ]); ?>