unique / yii2-flag-icon-css
为 Yii2 的 flag-icon-css 扩展
1.0.1
2017-11-29 07:04 UTC
Requires
- bower-asset/flag-icon-css: *
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-09 23:17:27 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": "*"
to
使用
安装扩展后,只需在您的代码中使用它即可
<?= \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 ]); ?>