From e6fe77f54181420661650f1c8d98078feaabd67d Mon Sep 17 00:00:00 2001 From: colemanw Date: Thu, 12 Oct 2023 21:57:17 -0400 Subject: [PATCH] Angular - Backport status check from #27798 --- CRM/Utils/Check/Component/Env.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 2ac6246f6f2f..f0a88a71624a 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -1106,4 +1106,25 @@ public function checkPHPIntlExists() { return $messages; } + public function checkAngularModuleSettings() { + $messages = []; + $modules = Civi::container()->get('angular')->getModules(); + foreach ($modules as $name => $module) { + if (!empty($module['settings'])) { + $messages[] = new CRM_Utils_Check_Message( + __FUNCTION__ . $name, + ts('The Angular file "%1" from extension "%2" must be updated to use "settingsFactory" instead of "settings". Developer info...', [ + 1 => $name, + 2 => $module['ext'], + 3 => 'target="_blank" href="https://github.com/civicrm/civicrm-core/pull/19052"', + ]), + ts('Unsupported Angular Setting'), + \Psr\Log\LogLevel::WARNING, + 'fa-code' + ); + } + } + return $messages; + } + }