Skip to content
Snippets Groups Projects
Commit 14cad4e8 authored by Ciprian Hossu's avatar Ciprian Hossu
Browse files

[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
......@@ -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
) . '&nbsp;(' . $translationServiceObject->translate(
$labelHeader
) . ')</strong>:&nbsp;' . $row['header_link'] . '</div>';
}
// Subheader
if ($row['subheader']) {
$headerContent .= '<div>' . '<strong>' . $translationServiceObject->translate(
$labelSubheader
) . '</strong>' . ':&nbsp;' . $row['subheader'] . '</div>';
}
// Content link
if ($row['tx_sgcontentlink_contentlink']) {
$headerContent .= '<div>' . '<strong>' . $translationServiceObject->translate(
$labelContentLink
) . '</strong>' . ':&nbsp;' . $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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment