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
{
19 public static function checkLocaleSupportsAddressParsing() {
21 $addressOptions = CRM_Core_BAO_Setting
::valueOptions(
22 CRM_Core_BAO_Setting
::SYSTEM_PREFERENCES_NAME
,
28 if ($addressOptions['street_address_parsing']) {
29 if (!CRM_Core_BAO_Address
::isSupportedParsingLocale()) {
30 $config = CRM_Core_Config
::singleton();
31 $messages[] = new CRM_Utils_Check_Message(
35 CRM_Utils_System
::url('civicrm/admin/setting/preferences/address', 'reset=1') .
36 '">Street address parsing</a> is enabled but not supported by <a href="' .
37 CRM_Utils_System
::url('civicrm/admin/setting/localization', 'reset=1') .
38 '">your locale</a> (%1).',
39 [1 => $config->lcMessages
]
41 ts('Street address parsing'),
42 \Psr\Log\LogLevel
::WARNING
,