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
df_tabs
Commits
3520ed4f
Commit
3520ed4f
authored
Feb 15, 2022
by
Matthias Adrowski
Browse files
[TASK] ECS Update + run
parent
110ed442
Changes
5
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/PluginController.php
View file @
3520ed4f
...
...
@@ -163,10 +163,9 @@ class PluginController extends AbstractPlugin {
$content
=
$exception
->
getMessage
();
}
if
(
isset
(
$this
->
pluginConfiguration
[
'classPrefix'
]
))
{
if
(
isset
(
$this
->
pluginConfiguration
[
'classPrefix'
]))
{
$this
->
prefixId
=
$this
->
pluginConfiguration
[
'classPrefix'
]
.
'plugin1'
;
}
else
{
}
else
{
$this
->
prefixId
=
'plugin1'
;
}
return
$this
->
pi_wrapInBaseClass
(
$content
);
...
...
Classes/Hooks/PageLayoutView/PluginRenderer.php
View file @
3520ed4f
...
...
@@ -33,7 +33,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* @package SGalinski\DfTabs\Hooks\PageLayoutView
*/
class
PluginRenderer
implements
\
TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface
{
protected
PreviewService
$previewService
;
public
function
init
()
{
...
...
Classes/Preview/PreviewRenderer.php
View file @
3520ed4f
...
...
@@ -31,7 +31,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
*
*/
class
PreviewRenderer
implements
PreviewRendererInterface
{
public
const
RETURNTYPE_ARR
=
'array'
;
/**
...
...
Classes/Preview/PreviewService.php
View file @
3520ed4f
...
...
@@ -27,7 +27,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* small helper class, aslong as we use PageLayout hook + Previewrenderer....
*/
class
PreviewService
{
public
const
RETURNTYPE_ARR
=
'array'
;
public
function
getPluginView
(
array
$row
):
StandaloneView
{
...
...
@@ -73,7 +72,7 @@ class PreviewService {
];
}
$titles
=
GeneralUtility
::
trimExplode
(
"
\n
"
,
$this
->
passVDefOnKeyToTemplate
(
$pluginConfiguration
,
'titles'
));
$titles
=
GeneralUtility
::
trimExplode
(
"
\n
"
,
$this
->
passVDefOnKeyToTemplate
(
$pluginConfiguration
,
'titles'
));
// Remove first item if it is empty to mimic what is actually saved to the DB and frontend behaviour.
// This gets done automatically on a second save of the plugin anyways but it should happen every time.
if
(
$titles
[
0
]
===
''
)
{
...
...
@@ -101,16 +100,15 @@ class PreviewService {
* @return array|mixed|string
*/
private
function
passVDefOnKeyToTemplate
(
array
$conf
,
string
$key
,
string
$returnType
=
''
)
{
if
(
isset
(
$conf
[
$key
]))
{
if
(
isset
(
$conf
[
$key
]))
{
return
$conf
[
$key
][
'vDEF'
];
}
// check if we got a possible returntype:
if
(
$returnType
===
self
::
RETURNTYPE_ARR
)
{
if
(
$returnType
===
self
::
RETURNTYPE_ARR
)
{
return
[];
}
return
''
;
}
}
ext_localconf.php
View file @
3520ed4f
...
...
@@ -59,6 +59,6 @@ call_user_func(
[
'source'
=>
'EXT:df_tabs/Resources/Public/Images/contentElementWizard.png'
]
);
$GLOBALS
[
'TCA'
][
'tt_content'
][
'types'
][
'list'
][
'previewRenderer'
][
'df_tabs_plugin1'
]
=
\
SGalinski\DfTabs\Preview\PreviewRenderer
::
class
;
$GLOBALS
[
'TCA'
][
'tt_content'
][
'types'
][
'list'
][
'previewRenderer'
][
'df_tabs_plugin1'
]
=
\
SGalinski\DfTabs\Preview\PreviewRenderer
::
class
;
}
);
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