0) { $country = array_values($country)[0]; } else { $country = null; } } if (empty($country)) { $data['items'] = [ [ 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:pleaseChooseCountry', '' ] ]; } else { $countryZones = $countryZonesDataProvider->getCountryZonesForCountryIso3($country); if (empty($countryZones)) { $data['items'] = [ [ 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:noZonesForThisCountry', '' ] ]; } else { foreach ($countryZones as $countryZone) { $data['items'][] = [$countryZone->getLocalName(), $countryZone->getIsoCode()]; } } } } else { $data['items'][] = ['Error: static_info_tables is not installed', '']; } } public function getCountryOptions(array $data, TcaSelectItems $tcaSelectItems) { if (ExtensionManagementUtility::isLoaded('static_info_tables')) { $countryDataProvider = GeneralUtility::makeInstance(CountryDataProvider::class); $countries = $countryDataProvider->getCountries(); foreach ($countries as $country) { $data['items'][] = [$country->getShortNameEn(), $country->getIsoCodeA3()]; } } else { $fallbackCountryDataProvider = GeneralUtility::makeInstance(FallbackCountryDataProvider::class); $countries = $fallbackCountryDataProvider->getCountries(); foreach ($countries as $key => $name) { $data['items'][] = [$name, $key]; } } } }