neosrulez/countrydatasource

There is no license information available for the latest version (1.0.1) of this package.

A package that provides a data source with all countries in the world including translations and other valuable data.

Fund package maintenance!
patriceckhart

Installs: 9 604

Dependents: 4

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 0

Type:neos-package

1.0.1 2021-04-18 12:27 UTC

This package is not auto-updated.

Last update: 2024-10-28 08:46:34 UTC


README

A package that provides a data source with all countries in the world including translations and other valuable data.

Installation

The NeosRulez.CountryDataSource package is listed on packagist (https://packagist.org/packages/neosrulez/countrydatasource) - therefore you don't have to include the package in your "repositories" entry any more.

Just run:

composer require neosrulez/countrydatasource

Usage

countries = NeosRulez.CountryDataSource:Class.Countries {
    // Example: Shows everything except Aruba, Germany and Austria
    exclude = ${'AW,DE,AT'}
    independent = 'false'
    unMember = 'true'
}

countries2 = NeosRulez.CountryDataSource:Class.Countries {
    // Example: Only shows Austria and Germany
    include = ${'AT,DE'}
    independent = 'false'
    unMember = 'true'
}

renderer = afx`
    <ul>
        <Neos.Fusion:Loop items={props.countries} itemName="country">
            <li>{country.flag} {country.name.common}</li>
        </Neos.Fusion:Loop>
    </ul>
    <ul>
        <Neos.Fusion:Loop items={props.countries2} itemName="country">
            <li>{country.flag} {country.name.common}</li>
        </Neos.Fusion:Loop>
    </ul>
`

Author