public function IpGeoLocGlobal::prettyPrint in IP Geolocation Views & Maps 8
Print the location array nicely.
Parameters
array $location: Array of location components.
Return value
string The location array formatted as string.
File
- src/
Services/ IpGeoLocGlobal.php, line 312
Class
- IpGeoLocGlobal
- Class IpGeoLocGlobal.
Namespace
Drupal\ip_geoloc\ServicesCode
public function prettyPrint(array $location) {
$t = '';
foreach ($location as $label => $value) {
if (!empty($value)) {
$t .= SafeMarkup::checkPlain($label) . ': <strong>' . SafeMarkup::checkPlain($value) . '</strong> ';
}
}
return empty($t) ? t('nothing') : $t;
}