Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
sg_mail
Commits
8fc58ba6
Commit
8fc58ba6
authored
Mar 26, 2019
by
Torsten Oppermann
Browse files
[TASK] Fixing issues with the manual registrations
parent
cef31dd1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/ConfigurationController.php
View file @
8fc58ba6
...
...
@@ -87,11 +87,18 @@ class ConfigurationController extends ActionController {
$this
->
view
->
assign
(
'mode'
,
$mode
);
if
(
$mode
===
'edit'
)
{
$templateToEdit
=
$registerArray
[
$selectedExtension
][
$selectedTemplate
];
$editableMarkers
=
[];
foreach
(
$templateToEdit
[
'marker'
]
as
$arr
)
{
$editableMarkers
[]
=
[
'identifier'
=>
$arr
[
'marker'
]
.
','
.
$arr
[
'markerLabel'
],
'value'
=>
$arr
[
'value'
],
'description'
=>
$arr
[
'description'
]
];
}
$csv
=
''
;
foreach
(
$
templateToEdit
[
'm
arker
'
]
as
$arr
)
{
foreach
(
$
editableM
arker
s
as
$arr
)
{
$csv
.
=
implode
(
';'
,
$arr
)
.
"
\r\n
"
;
}
$this
->
view
->
assignMultiple
(
...
...
@@ -162,10 +169,15 @@ class ConfigurationController extends ActionController {
if
(
!
$rowArray
[
0
])
{
continue
;
}
$markerArray
=
GeneralUtility
::
trimExplode
(
','
,
$rowArray
[
0
],
FALSE
,
2
);
$markerName
=
$markerArray
[
0
];
$markerLabel
=
$markerArray
[
1
]
??
$markerName
;
$markers
[]
=
[
'identifier'
=>
$
rowArray
[
0
]
,
'identifier'
=>
$
markerName
,
'value'
=>
$rowArray
[
1
],
'description'
=>
$rowArray
[
2
]
'description'
=>
$rowArray
[
2
],
'markerLabel'
=>
$markerLabel
];
}
...
...
@@ -226,10 +238,15 @@ class ConfigurationController extends ActionController {
if
(
!
$rowArray
[
0
])
{
continue
;
}
$markerArray
=
GeneralUtility
::
trimExplode
(
','
,
$rowArray
[
0
],
FALSE
,
2
);
$markerName
=
$markerArray
[
0
];
$markerLabel
=
$markerArray
[
1
]
??
$markerName
;
$markers
[]
=
[
'identifier'
=>
$rowArray
[
0
],
'value'
=>
$rowArray
[
1
],
'description'
=>
$rowArray
[
2
]
'description'
=>
$rowArray
[
2
],
'markerLabel'
=>
$markerLabel
];
}
...
...
Classes/Service/MailTemplateService.php
View file @
8fc58ba6
...
...
@@ -346,6 +346,13 @@ class MailTemplateService {
*/
public
function
setMarkers
(
array
$markers
):
MailTemplateService
{
$this
->
markers
=
$markers
;
foreach
(
$markers
as
$key
=>
$currentMarker
)
{
if
(
!
isset
(
$currentMarker
[
'markerLabel'
]))
{
continue
;
}
$this
->
markerLabels
[
$key
]
=
$currentMarker
[
'markerLabel'
];
}
return
$this
;
}
...
...
@@ -614,6 +621,10 @@ class MailTemplateService {
$temporaryMarkerArray
=
[];
foreach
(
array_reverse
(
$markerPath
)
as
$index
=>
$markerPathSegment
)
{
if
(
$index
===
0
)
{
if
(
$marker
[
'markerLabel'
])
{
$markerPathSegment
=
$marker
[
'markerLabel'
];
}
if
(
$marker
[
'backend_translation_key'
])
{
$temporaryMarkerArray
[
$markerPathSegment
]
=
LocalizationUtility
::
translate
(
$marker
[
'backend_translation_key'
],
$marker
[
'extension_key'
]
...
...
Classes/Service/RegisterService.php
View file @
8fc58ba6
...
...
@@ -254,6 +254,9 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
foreach
(
$markers
as
$marker
)
{
$markerName
=
$marker
[
'identifier'
];
$markerArray
=
GeneralUtility
::
trimExplode
(
','
,
$markerName
,
FALSE
,
2
);
$markerName
=
$markerArray
[
0
];
$newRegisterArray
[
'markers'
][]
=
[
'marker'
=>
$markerName
,
'type'
=>
MailTemplateService
::
MARKER_TYPE_STRING
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment