Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_youtube
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_youtube
Commits
14cad4e8
Commit
14cad4e8
authored
4 years ago
by
Ciprian Hossu
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Remove header and content links from plugin preview
parent
2ef487b2
No related branches found
No related tags found
1 merge request
!1
[FEATURE] Add backend preview for the YouTube Videos plugin
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/Hooks/PluginRenderer.php
+2
-26
2 additions, 26 deletions
Classes/Hooks/PluginRenderer.php
with
2 additions
and
26 deletions
Classes/Hooks/PluginRenderer.php
+
2
−
26
View file @
14cad4e8
...
...
@@ -50,20 +50,11 @@ class PluginRenderer implements PageLayoutViewDrawItemHookInterface {
$labelPluginName
=
BackendUtility
::
getLabelFromItemListMerged
(
$row
[
'pid'
],
'tt_content'
,
'list_type'
,
$row
[
'list_type'
]
);
$labelHeader
=
BackendUtility
::
getItemLabel
(
'tt_content'
,
'header'
);
$labelHeaderLink
=
BackendUtility
::
getItemLabel
(
'tt_content'
,
'header_link'
);
$labelSubheader
=
BackendUtility
::
getItemLabel
(
'tt_content'
,
'subheader'
);
$labelContentLink
=
BackendUtility
::
getItemLabel
(
'tt_content'
,
'tx_sgcontentlink_contentlink'
);
//
Make instance of
TranslationService class
//
Instantiate
TranslationService class
$translationServiceObject
=
GeneralUtility
::
makeInstance
(
TranslationService
::
class
);
// Begin rendering of content element fields
...
...
@@ -81,27 +72,12 @@ class PluginRenderer implements PageLayoutViewDrawItemHookInterface {
}
}
//Header link
if
(
$row
[
'header_link'
])
{
$headerContent
.
=
'<div><strong>'
.
$translationServiceObject
->
translate
(
$labelHeaderLink
)
.
' ('
.
$translationServiceObject
->
translate
(
$labelHeader
)
.
')</strong>: '
.
$row
[
'header_link'
]
.
'</div>'
;
}
// Subheader
if
(
$row
[
'subheader'
])
{
$headerContent
.
=
'<div>'
.
'<strong>'
.
$translationServiceObject
->
translate
(
$labelSubheader
)
.
'</strong>'
.
': '
.
$row
[
'subheader'
]
.
'</div>'
;
}
// Content link
if
(
$row
[
'tx_sgcontentlink_contentlink'
])
{
$headerContent
.
=
'<div>'
.
'<strong>'
.
$translationServiceObject
->
translate
(
$labelContentLink
)
.
'</strong>'
.
': '
.
$row
[
'tx_sgcontentlink_contentlink'
]
.
'</div>'
;
}
// Set plugin options array
$pluginOptions
=
GeneralUtility
::
xml2array
(
$row
[
'pi_flexform'
],
'T3:'
);
...
...
@@ -154,7 +130,7 @@ class PluginRenderer implements PageLayoutViewDrawItemHookInterface {
// Get storage page(s)
$backendUtilityObject
=
GeneralUtility
::
makeInstance
(
BackendUtility
::
class
);
$storagePageIds
=
explode
(
','
,
$row
[
'pages'
]);
$storagePages
=
[]
;
$storagePages
=
array
()
;
foreach
(
$storagePageIds
as
$i
=>
$storagePageId
)
{
$storagePages
[]
=
$backendUtilityObject
->
getRecord
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment