gplcart / country_flag
Adds country icons
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:gplcart-module
Requires
- assets/flag-icon-css: 2.8.0
- gplcart/composer-module-installer: ^1
This package is not auto-updated.
Last update: 2024-12-22 05:44:57 UTC
README
Country flags is a GPL Cart module that adds a collection of country flags in SVG format (see https://github.com/lipis/flag-icon-css).
Icons are automatically added to country data arrays:
// Single item
$country = \gplcart\core\models\Country::get($code);
if(!empty($country['image])){
print_r($country['image]);
}
// Lists
$countries = \gplcart\core\models\Country::getList();
foreach($countries as $country){
if(!empty($country['image])){
print_r($country['image]);
}
}
To get them manually call \gplcart\modules\country_flag\CountryFlag::getFlagImages()
Installation
This module requires 3-d party library which should be downloaded separately. You have to use Composer to download all the dependencies.
- From your web root directory:
composer require gplcart/country_flag
. If the module was downloaded and placed intosystem/modules
manually, runcomposer update
to make sure that all 3-d party files are presented in thevendor
directory. - Go to
admin/module/list
end enable the module