Commit 5900669d authored by bojanz's avatar bojanz

Issue #2633912 by bojanz, GoZ: Default country widget summary

parent 9482753c
......@@ -169,6 +169,27 @@ class AddressDefaultWidget extends WidgetBase implements ContainerFactoryPluginI
return $element;
}
/**
* {@inheritdoc}
*/
public function settingsSummary() {
$default_country = $this->getSetting('default_country');
if (empty($default_country)) {
$default_country = t('None');
}
elseif ($default_country == 'site_default') {
$default_country = t('Site default');
}
else {
$country_list = $this->countryRepository->getList();
$default_country = $country_list[$default_country];
}
$summary = [];
$summary['default_country'] = $this->t('Default country: @country', ['@country' => $default_country]);
return $summary;
}
/**
* Gets the initial values for the widget.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment