Skip to content

Commit 48cc10d

Browse files
Mabahemschwemer
authored andcommitted
[FEATURE] Provide the current value in overwrite value from TypoScript feature
Resolves: #1260
1 parent 2a9f0de commit 48cc10d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Classes/Utility/TypoScriptUtility.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ public static function overwriteValueFromTypoScript(
2525
?array $conf = [],
2626
string $key = ''
2727
): string {
28-
if (ObjectUtility::getContentObject()->cObjGetSingle($conf[$key]??'', $conf[$key . '.']??[])) {
29-
$string = ObjectUtility::getContentObject()->cObjGetSingle($conf[$key], $conf[$key . '.']);
28+
$contentObject = ObjectUtility::getContentObject();
29+
$contentObject->setCurrentVal($string);
30+
if ($contentObject->cObjGetSingle($conf[$key]??'', $conf[$key . '.']??[])) {
31+
$string = $contentObject->cObjGetSingle($conf[$key], $conf[$key . '.']);
3032
}
3133
return $string;
3234
}

0 commit comments

Comments
 (0)