From 345a9fdecfce3a26978a0f1ef89416fc6ce1331d Mon Sep 17 00:00:00 2001 From: Stanislav Kutasevits Date: Thu, 11 Jul 2024 13:45:22 +0300 Subject: [PATCH] S2FRMS-40 Using $this->t() instead of t() --- .../src/Plugin/WebformElement/NemidChildrenRadios.php | 2 +- .../src/Plugin/WebformElement/NemidChildrenSelect.php | 2 +- .../Plugin/WebformElement/ServiceplatformenCprElementBase.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenRadios.php b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenRadios.php index b6f3876..fb88f35 100644 --- a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenRadios.php +++ b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenRadios.php @@ -142,7 +142,7 @@ public function handleElementPrepopulate(array &$element, FormStateInterface &$f if (is_array($children) && !empty($children)) { foreach ($children as $child) { if ($child['nameAddressProtected']) { - $options[$child['cpr']] = $child['cpr'] . ' (' . t('Name and address protection') . ')'; + $options[$child['cpr']] = $child['cpr'] . ' (' . $this->t('Name and address protection') . ')'; $showAddressNameProtectionMessage = TRUE; } else { diff --git a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenSelect.php b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenSelect.php index 9b41ff3..eb12d83 100644 --- a/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenSelect.php +++ b/modules/os2forms_nemid/src/Plugin/WebformElement/NemidChildrenSelect.php @@ -142,7 +142,7 @@ public function handleElementPrepopulate(array &$element, FormStateInterface &$f if (is_array($children) && !empty($children)) { foreach ($children as $child) { if ($child['nameAddressProtected']) { - $options[$child['cpr']] = $child['cpr'] . ' (' . t('Name and address protection') . ')'; + $options[$child['cpr']] = $child['cpr'] . ' (' . $this->t('Name and address protection') . ')'; $showAddressNameProtectionMessage = TRUE; } else { diff --git a/modules/os2forms_nemid/src/Plugin/WebformElement/ServiceplatformenCprElementBase.php b/modules/os2forms_nemid/src/Plugin/WebformElement/ServiceplatformenCprElementBase.php index 18e5000..3b23d51 100644 --- a/modules/os2forms_nemid/src/Plugin/WebformElement/ServiceplatformenCprElementBase.php +++ b/modules/os2forms_nemid/src/Plugin/WebformElement/ServiceplatformenCprElementBase.php @@ -47,7 +47,7 @@ public function handleElementPrepopulate(array &$element, FormStateInterface &$f * String indicating Name and Address protection or nothing. */ public function getNameAddressProtectedText(CprLookupResult $cprLookupResult) { - return $cprLookupResult->isNameAddressProtected() ? ' (' . t('Name and address protection') . ')' : ''; + return $cprLookupResult->isNameAddressProtected() ? ' (' . $this->t('Name and address protection') . ')' : ''; } }