3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Utils_Check_Component_AddressParsing
extends CRM_Utils_Check_Component
{
20 * @return CRM_Utils_Check_Message[]
22 public static function checkLocaleSupportsAddressParsing() {
24 $addressOptions = CRM_Core_BAO_Setting
::valueOptions(
25 CRM_Core_BAO_Setting
::SYSTEM_PREFERENCES_NAME
,
31 if ($addressOptions['street_address_parsing']) {
32 if (!CRM_Core_BAO_Address
::isSupportedParsingLocale()) {
33 $config = CRM_Core_Config
::singleton();
34 $messages[] = new CRM_Utils_Check_Message(
38 CRM_Utils_System
::url('civicrm/admin/setting/preferences/address', 'reset=1') .
39 '">Street address parsing</a> is enabled but not supported by <a href="' .
40 CRM_Utils_System
::url('civicrm/admin/setting/localization', 'reset=1') .
41 '">your locale</a> (%1).',
42 [1 => $config->lcMessages
]
44 ts('Street address parsing'),
45 \Psr\Log\LogLevel
::WARNING
,