Skip to content

Commit

Permalink
S2FRMS-40 Using $this->t() instead of t()
Browse files Browse the repository at this point in the history
  • Loading branch information
stankut committed Jul 11, 2024
1 parent 58fe8c1 commit 345a9fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') . ')' : '';
}

}

0 comments on commit 345a9fd

Please sign in to comment.