Commit c62f617b authored by Frank Nägler's avatar Frank Nägler Committed by Wouter Wolters
Browse files

[TASK] Call explicit render() on icon objects

Resolves: #70417
Releases: master
Change-Id: Ie855b996636b749562acf3baa67b1756c2ad3db2
Reviewed-on: http://review.typo3.org/43826

Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 46679815
...@@ -56,7 +56,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface { ...@@ -56,7 +56,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface {
'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesTitle', TRUE), 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesTitle', TRUE),
'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesDescription', TRUE), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesDescription', TRUE),
'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'pages', 'ajaxCall' => 1]), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'pages', 'ajaxCall' => 1]),
'icon' => $iconFactory->getIcon('actions-system-cache-clear-impact-low', Icon::SIZE_SMALL) 'icon' => $iconFactory->getIcon('actions-system-cache-clear-impact-low', Icon::SIZE_SMALL)->render()
); );
$this->optionValues[] = 'pages'; $this->optionValues[] = 'pages';
} }
...@@ -68,7 +68,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface { ...@@ -68,7 +68,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface {
'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesTitle', TRUE), 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesTitle', TRUE),
'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesDescription', TRUE), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesDescription', TRUE),
'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'all', 'ajaxCall' => 1]), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'all', 'ajaxCall' => 1]),
'icon' => $iconFactory->getIcon('actions-system-cache-clear-impact-medium', Icon::SIZE_SMALL) 'icon' => $iconFactory->getIcon('actions-system-cache-clear-impact-medium', Icon::SIZE_SMALL)->render()
); );
$this->optionValues[] = 'all'; $this->optionValues[] = 'all';
} }
...@@ -84,7 +84,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface { ...@@ -84,7 +84,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface {
'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesTitle', TRUE), 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesTitle', TRUE),
'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesDescription', TRUE), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesDescription', TRUE),
'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'system', 'ajaxCall' => 1]), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'system', 'ajaxCall' => 1]),
'icon' => $iconFactory->getIcon('actions-system-cache-clear-impact-high', Icon::SIZE_SMALL) 'icon' => $iconFactory->getIcon('actions-system-cache-clear-impact-high', Icon::SIZE_SMALL)->render()
); );
$this->optionValues[] = 'system'; $this->optionValues[] = 'system';
} }
......
...@@ -128,9 +128,9 @@ class ShortcutToolbarItem implements ToolbarItemInterface { ...@@ -128,9 +128,9 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
$shortcutEdit = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksEdit', TRUE); $shortcutEdit = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksEdit', TRUE);
$shortcutDelete = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksDelete', TRUE); $shortcutDelete = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarksDelete', TRUE);
$editIcon = '<a href="#" class="dropdown-list-link-edit shortcut-edit" ' . $shortcutEdit . '>' $editIcon = '<a href="#" class="dropdown-list-link-edit shortcut-edit" ' . $shortcutEdit . '>'
. $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>'; . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
$deleteIcon = '<a href="#" class="dropdown-list-link-delete shortcut-delete" title="' . $shortcutDelete . '">' $deleteIcon = '<a href="#" class="dropdown-list-link-delete shortcut-delete" title="' . $shortcutDelete . '">'
. $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL) . '</a>'; . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
$shortcutMenu[] = '<ul class="dropdown-list">'; $shortcutMenu[] = '<ul class="dropdown-list">';
......
...@@ -292,7 +292,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface { ...@@ -292,7 +292,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface {
*/ */
public function getItem() { public function getItem() {
$title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo', TRUE); $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo', TRUE);
$icon = $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL); $icon = $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render();
return '<span title="' . $title . '">' . $icon . '<span id="t3js-systeminformation-counter" class="badge"></span></span>'; return '<span title="' . $title . '">' . $icon . '<span id="t3js-systeminformation-counter" class="badge"></span></span>';
} }
......
...@@ -912,7 +912,7 @@ class ClickMenu { ...@@ -912,7 +912,7 @@ class ClickMenu {
$identifier = $fileObject->getCombinedIdentifier(); $identifier = $fileObject->getCombinedIdentifier();
if ($fileObject instanceof Folder) { if ($fileObject instanceof Folder) {
$icon = '<span title="' . htmlspecialchars($fileObject->getName()) . '" class="absmiddle">' $icon = '<span title="' . htmlspecialchars($fileObject->getName()) . '" class="absmiddle">'
. $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL) . $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL)->render()
. '</span>'; . '</span>';
$folder = TRUE; $folder = TRUE;
if ($fileObject->getIdentifier() === $fileObject->getStorage()->getRootLevelFolder()->getIdentifier()) { if ($fileObject->getIdentifier() === $fileObject->getStorage()->getRootLevelFolder()->getIdentifier()) {
...@@ -930,7 +930,7 @@ class ClickMenu { ...@@ -930,7 +930,7 @@ class ClickMenu {
} else { } else {
$title = $fileObject->getName() . ' (' . GeneralUtility::formatSize($fileObject->getSize()) . ')'; $title = $fileObject->getName() . ' (' . GeneralUtility::formatSize($fileObject->getSize()) . ')';
$icon = '<span class="absmiddle" title="' . htmlspecialchars($title). '">' $icon = '<span class="absmiddle" title="' . htmlspecialchars($title). '">'
. $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL) . $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL)->render()
.'</span>'; .'</span>';
} }
// Hide // Hide
......
...@@ -278,7 +278,7 @@ class Clipboard { ...@@ -278,7 +278,7 @@ class Clipboard {
$menuSelector = ''; $menuSelector = '';
if ($elementCount) { if ($elementCount) {
// Delete: // Delete:
$deleteLink = '<a class="btn btn-danger" href="' . htmlspecialchars($removeAllUrl) . '#clip_head" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; $deleteLink = '<a class="btn btn-danger" href="' . htmlspecialchars($removeAllUrl) . '#clip_head" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
if ($this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE)) { if ($this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE)) {
$js = ' $js = '
if (confirm(' . GeneralUtility::quoteJSvalue(sprintf($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:mess.deleteClip'), $elementCount)) . ')){ if (confirm(' . GeneralUtility::quoteJSvalue(sprintf($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:mess.deleteClip'), $elementCount)) . ')){
...@@ -382,7 +382,7 @@ class Clipboard { ...@@ -382,7 +382,7 @@ class Clipboard {
$thumb = ''; $thumb = '';
$folder = $fileObject instanceof \TYPO3\CMS\Core\Resource\Folder; $folder = $fileObject instanceof \TYPO3\CMS\Core\Resource\Folder;
$size = $folder ? '' : '(' . GeneralUtility::formatSize($fileObject->getSize()) . 'bytes)'; $size = $folder ? '' : '(' . GeneralUtility::formatSize($fileObject->getSize()) . 'bytes)';
$icon = '<span title="' . htmlspecialchars($fileObject->getName() . ' ' . $size) . '">' . $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL) . '</span>'; $icon = '<span title="' . htmlspecialchars($fileObject->getName() . ' ' . $size) . '">' . $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL)->render() . '</span>';
if (!$folder && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getExtension())) { if (!$folder && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getExtension())) {
$processedFile = $fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array()); $processedFile = $fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array());
if ($processedFile) { if ($processedFile) {
...@@ -399,7 +399,7 @@ class Clipboard { ...@@ -399,7 +399,7 @@ class Clipboard {
<td nowrap="nowrap" width="95%">' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileObject->getName(), $this->getBackendUser()->uc['titleLen'])), $fileObject->getName()) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;' . $thumb . '</td> <td nowrap="nowrap" width="95%">' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileObject->getName(), $this->getBackendUser()->uc['titleLen'])), $fileObject->getName()) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;' . $thumb . '</td>
<td nowrap="nowrap" class="col-control"> <td nowrap="nowrap" class="col-control">
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($v) . '); return false;')) . '"title="' . $this->clLabel('info', 'cm') .'">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL) . '</a>' . '<a class="btn btn-default" href="' . htmlspecialchars($this->removeUrl('_FILE', GeneralUtility::shortmd5($v))) . '#clip_head" title="' . $this->clLabel('removeItem') .'">' . $this->iconFactory->getIcon('actions-selection-delete', Icon::SIZE_SMALL) . '</a> <a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($v) . '); return false;')) . '"title="' . $this->clLabel('info', 'cm') .'">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '</a>' . '<a class="btn btn-default" href="' . htmlspecialchars($this->removeUrl('_FILE', GeneralUtility::shortmd5($v))) . '#clip_head" title="' . $this->clLabel('removeItem') .'">' . $this->iconFactory->getIcon('actions-selection-delete', Icon::SIZE_SMALL)->render() . '</a>
</div> </div>
</td> </td>
</tr>'; </tr>';
...@@ -418,7 +418,7 @@ class Clipboard { ...@@ -418,7 +418,7 @@ class Clipboard {
<td nowrap="nowrap" width="95%">' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $this->getBackendUser()->uc['titleLen'])), $rec, $table) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;</td> <td nowrap="nowrap" width="95%">' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $this->getBackendUser()->uc['titleLen'])), $rec, $table) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;</td>
<td nowrap="nowrap" class="col-control"> <td nowrap="nowrap" class="col-control">
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', \'' . (int)$uid . '\'); return false;')) . '" title="' . $this->clLabel('info', 'cm') .'">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL) . '</a>' . '<a class="btn btn-default" href="' . htmlspecialchars($this->removeUrl($table, $uid)) . '#clip_head" title="' . $this->clLabel('removeItem') .'">' . $this->iconFactory->getIcon('actions-selection-delete', Icon::SIZE_SMALL) . '</a> <a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', \'' . (int)$uid . '\'); return false;')) . '" title="' . $this->clLabel('info', 'cm') .'">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '</a>' . '<a class="btn btn-default" href="' . htmlspecialchars($this->removeUrl($table, $uid)) . '#clip_head" title="' . $this->clLabel('removeItem') .'">' . $this->iconFactory->getIcon('actions-selection-delete', Icon::SIZE_SMALL)->render() . '</a>
</div> </div>
</td> </td>
</tr>'; </tr>';
......
...@@ -201,7 +201,7 @@ abstract class AbstractContextMenuDataProvider { ...@@ -201,7 +201,7 @@ abstract class AbstractContextMenuDataProvider {
if (!isset($actionConfiguration['iconName'])) { if (!isset($actionConfiguration['iconName'])) {
$actionConfiguration['iconName'] = 'miscellaneous-placeholder'; $actionConfiguration['iconName'] = 'miscellaneous-placeholder';
} }
$action->setIcon((string)$iconFactory->getIcon($actionConfiguration['iconName'], Icon::SIZE_SMALL)); $action->setIcon($iconFactory->getIcon($actionConfiguration['iconName'], Icon::SIZE_SMALL)->render());
} }
$actionCollection->offsetSet($level . (int)$index, $action); $actionCollection->offsetSet($level . (int)$index, $action);
$actionCollection->ksort(); $actionCollection->ksort();
......
...@@ -228,9 +228,9 @@ class BackendLayoutWizardController { ...@@ -228,9 +228,9 @@ class BackendLayoutWizardController {
$iconFactory = GeneralUtility::makeInstance(IconFactory::class); $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$lang = $this->getLanguageService(); $lang = $this->getLanguageService();
$resourcePath = ExtensionManagementUtility::extRelPath('backend') . 'Resources/Public/Images/BackendLayoutWizard/'; $resourcePath = ExtensionManagementUtility::extRelPath('backend') . 'Resources/Public/Images/BackendLayoutWizard/';
$content = '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . '</a>'; $content = '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
$content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . $iconFactory->getIcon('actions-document-save-close', Icon::SIZE_SMALL) . '</a>'; $content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . $iconFactory->getIcon('actions-document-save-close', Icon::SIZE_SMALL)->render() . '</a>';
$content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . $iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; $content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . $iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
$content .= $this->doc->spacer(10); $content .= $this->doc->spacer(10);
$content .= ' $content .= '
<table border="0" width="90%" height="90%" id="outer_container"> <table border="0" width="90%" height="90%" id="outer_container">
......
...@@ -132,7 +132,7 @@ class ElementHistoryController { ...@@ -132,7 +132,7 @@ class ElementHistoryController {
$returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl')); $returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
if ($returnUrl) { if ($returnUrl) {
$iconFactory = GeneralUtility::makeInstance(IconFactory::class); $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$buttons['back'] = '<a href="' . htmlspecialchars($returnUrl) . '" class="typo3-goBack">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>'; $buttons['back'] = '<a href="' . htmlspecialchars($returnUrl) . '" class="typo3-goBack">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
} }
return $buttons; return $buttons;
} }
......
...@@ -325,7 +325,7 @@ class ElementInformationController { ...@@ -325,7 +325,7 @@ class ElementInformationController {
if ($url) { if ($url) {
$showLink .= ' $showLink .= '
<a class="btn btn-primary" href="' . htmlspecialchars($url) . '" target="_blank"> <a class="btn btn-primary" href="' . htmlspecialchars($url) . '" target="_blank">
' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . ' ' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '
' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.show', TRUE) . ' ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.show', TRUE) . '
</a>'; </a>';
} }
...@@ -488,7 +488,7 @@ class ElementInformationController { ...@@ -488,7 +488,7 @@ class ElementInformationController {
if ($returnUrl) { if ($returnUrl) {
$backLink .= ' $backLink .= '
<a class="btn btn-primary" href="' . htmlspecialchars($returnUrl) . '> <a class="btn btn-primary" href="' . htmlspecialchars($returnUrl) . '>
' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . ' ' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '
' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:back', TRUE) . ' ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:back', TRUE) . '
</a>'; </a>';
} }
...@@ -589,7 +589,7 @@ class ElementInformationController { ...@@ -589,7 +589,7 @@ class ElementInformationController {
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters); $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$pageActionIcons = ' $pageActionIcons = '
<a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '"> <a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '">
' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . ' ' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '
</a>'; </a>';
// History button // History button
...@@ -600,7 +600,7 @@ class ElementInformationController { ...@@ -600,7 +600,7 @@ class ElementInformationController {
$url = BackendUtility::getModuleUrl('record_history', $urlParameters); $url = BackendUtility::getModuleUrl('record_history', $urlParameters);
$pageActionIcons .= ' $pageActionIcons .= '
<a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '"> <a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '">
' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL) . ' ' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)->render() . '
</a>'; </a>';
if ($table === 'pages') { if ($table === 'pages') {
...@@ -608,14 +608,14 @@ class ElementInformationController { ...@@ -608,14 +608,14 @@ class ElementInformationController {
$url = BackendUtility::getModuleUrl('web_list', array('id' => $uid, 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI'))); $url = BackendUtility::getModuleUrl('web_list', array('id' => $uid, 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')));
$pageActionIcons .= ' $pageActionIcons .= '
<a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showList') . '"> <a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showList') . '">
' . $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL) . ' ' . $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . '
</a>'; </a>';
// View page button // View page button
$viewOnClick = BackendUtility::viewOnClick($uid, '', BackendUtility::BEgetRootLine($uid)); $viewOnClick = BackendUtility::viewOnClick($uid, '', BackendUtility::BEgetRootLine($uid));
$pageActionIcons .= ' $pageActionIcons .= '
<a class="btn btn-default btn-sm" href="#" onclick="' . htmlspecialchars($viewOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '"> <a class="btn btn-default btn-sm" href="#" onclick="' . htmlspecialchars($viewOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">
' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . ' ' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '
</a>'; </a>';
} }
......
...@@ -174,7 +174,7 @@ class MoveElementController { ...@@ -174,7 +174,7 @@ class MoveElementController {
$pidPageInfo = BackendUtility::readPageAccess($pageInfo['pid'], $this->perms_clause); $pidPageInfo = BackendUtility::readPageAccess($pageInfo['pid'], $this->perms_clause);
if (is_array($pidPageInfo)) { if (is_array($pidPageInfo)) {
if ($backendUser->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) { if ($backendUser->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
$code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageInfo['pid'], 'moveUid' => $this->moveUid))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />'; $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageInfo['pid'], 'moveUid' => $this->moveUid))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
} else { } else {
$code .= $this->iconFactory->getIconForRecord('pages', $pidPageInfo, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />'; $code .= $this->iconFactory->getIconForRecord('pages', $pidPageInfo, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
} }
...@@ -224,7 +224,7 @@ class MoveElementController { ...@@ -224,7 +224,7 @@ class MoveElementController {
$code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array( $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array(
'uid' => (int)$pageInfo['pid'], 'uid' => (int)$pageInfo['pid'],
'moveUid' => $this->moveUid 'moveUid' => $this->moveUid
))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />'; ))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
} else { } else {
$code .= $this->iconFactory->getIconForRecord('pages', $pidPageInfo, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />'; $code .= $this->iconFactory->getIconForRecord('pages', $pidPageInfo, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
} }
...@@ -276,7 +276,7 @@ class MoveElementController { ...@@ -276,7 +276,7 @@ class MoveElementController {
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs'); $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs');
} }
if ($this->R_URI) { if ($this->R_URI) {
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>'; $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
} }
} }
return $buttons; return $buttons;
......
...@@ -281,7 +281,7 @@ class NewContentElementController { ...@@ -281,7 +281,7 @@ class NewContentElementController {
'source' => $icon 'source' => $icon
)); ));
} }
$icon = $this->iconFactory->getIcon($wInfo['iconIdentifier']); $icon = $this->iconFactory->getIcon($wInfo['iconIdentifier'])->render();
$menuItems[$key]['content'] .= ' $menuItems[$key]['content'] .= '
<div class="media"> <div class="media">
<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"> <a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
...@@ -365,7 +365,7 @@ class NewContentElementController { ...@@ -365,7 +365,7 @@ class NewContentElementController {
if ($this->id && $this->access) { if ($this->id && $this->access) {
$buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce'); $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce');
if ($this->R_URI) { if ($this->R_URI) {
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>'; $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
} }
} }
return $buttons; return $buttons;
......
...@@ -1098,7 +1098,7 @@ class EditDocumentController { ...@@ -1098,7 +1098,7 @@ class EditDocumentController {
if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly']) { if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly']) {
// SAVE button: // SAVE button:
$buttons['save'] = '<button name="_savedok" class="c-inputButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">' $buttons['save'] = '<button name="_savedok" class="c-inputButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '">'
. $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL) . $iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render()
. '</button>'; . '</button>';
// SAVE / VIEW button: // SAVE / VIEW button:
if ($this->viewId && !$this->noView && $this->getNewIconMode($this->firstEl['table'], 'saveDocView')) { if ($this->viewId && !$this->noView && $this->getNewIconMode($this->firstEl['table'], 'saveDocView')) {
...@@ -1111,38 +1111,38 @@ class EditDocumentController { ...@@ -1111,38 +1111,38 @@ class EditDocumentController {
} }
if (!in_array((int)$this->pageinfo['doktype'], $excludeDokTypes, TRUE) || isset($pagesTSconfig['TCEMAIN.']['preview.'][$this->firstEl['table'].'.']['previewPageId'])) { if (!in_array((int)$this->pageinfo['doktype'], $excludeDokTypes, TRUE) || isset($pagesTSconfig['TCEMAIN.']['preview.'][$this->firstEl['table'].'.']['previewPageId'])) {
$buttons['save_view'] = '<button name="_savedokview" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', TRUE) . '" onclick="window.open(\'\', \'newTYPO3frontendWindow\');">' $buttons['save_view'] = '<button name="_savedokview" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', TRUE) . '" onclick="window.open(\'\', \'newTYPO3frontendWindow\');">'
. $iconFactory->getIcon('actions-document-save-view', Icon::SIZE_SMALL) . $iconFactory->getIcon('actions-document-save-view', Icon::SIZE_SMALL)->render()
. '</button>'; . '</button>';
} }
} }
// SAVE / NEW button: // SAVE / NEW button:
if (count($this->elementsData) === 1 && $this->getNewIconMode($this->firstEl['table'])) { if (count($this->elementsData) === 1 && $this->getNewIconMode($this->firstEl['table'])) {
$buttons['save_new'] = '<button name="_savedoknew" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveNewDoc', TRUE) . '">' $buttons['save_new'] = '<button name="_savedoknew" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveNewDoc', TRUE) . '">'
. $iconFactory->getIcon('actions-document-save-new', Icon::SIZE_SMALL) . $iconFactory->getIcon('actions-document-save-new', Icon::SIZE_SMALL)->render()
. '</button>'; . '</button>';
} }
// SAVE / CLOSE // SAVE / CLOSE
$buttons['save_close'] = '<button name="_saveandclosedok" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '">' $buttons['save_close'] = '<button name="_saveandclosedok" class="c-inputButton t3js-editform-submitButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '">'
. $iconFactory->getIcon('actions-document-save-close', Icon::SIZE_SMALL) . $iconFactory->getIcon('actions-document-save-close', Icon::SIZE_SMALL)->render()
. '</button>'; . '</button>';
// FINISH TRANSLATION / SAVE / CLOSE // FINISH TRANSLATION / SAVE / CLOSE
if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation']) { if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation']) {
$buttons['translation_save'] = '<button name="_translation_savedok" class="c-inputButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDoc', TRUE) . '">' $buttons['translation_save'] = '<button name="_translation_savedok" class="c-inputButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDoc', TRUE) . '">'
. $iconFactory->getIcon('actions-document-save-translation', Icon::SIZE_SMALL) . $iconFactory->getIcon('actions-document-save-translation', Icon::SIZE_SMALL)->render()
. '</button>'; . '</button>';
$buttons['translation_saveclear'] = '<button name="_translation_savedokclear" class="c-inputButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDocClear', TRUE) . '">' $buttons['translation_saveclear'] = '<button name="_translation_savedokclear" class="c-inputButton" value="1" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDocClear', TRUE) . '">'
. $iconFactory->getIcon('actions-document-save-cleartranslationcache', Icon::SIZE_SMALL) . $iconFactory->getIcon('actions-document-save-cleartranslationcache', Icon::SIZE_SMALL)->render()
. '</button>'; . '</button>';
} }
} }
// CLOSE button: // CLOSE button:
$buttons['close'] = '<a href="#" class="t3js-editform-close" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL) . '</a>'; $buttons['close'] = '<a href="#" class="t3js-editform-close" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
// DELETE + UNDO buttons: // DELETE + UNDO buttons:
if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData) === 1) { if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData) === 1) {
if ($this->firstEl['cmd'] != 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) { if ($this->firstEl['cmd'] != 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
// Delete: // Delete:
if ($this->firstEl['deleteAccess'] && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'], 'disableDelete')) { if ($this->firstEl['deleteAccess'] && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'], 'disableDelete')) {
$buttons['delete'] = '<a href="#" class="t3js-editform-delete-record" data-return-url="' . htmlspecialchars($this->retUrl) . '" data-uid="' . htmlspecialchars($this->firstEl['uid']) . '" data-table="' . htmlspecialchars($this->firstEl['table']) . '" title="' . $lang->getLL('deleteItem', TRUE) . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL) . '</a>'; $buttons['delete'] = '<a href="#" class="t3js-editform-delete-record" data-return-url="' . htmlspecialchars($this->retUrl) . '" data-uid="' . htmlspecialchars($this->firstEl['uid']) . '" data-table="' . htmlspecialchars($this->firstEl['table']) . '" title="' . $lang->getLL('deleteItem', TRUE) . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
} }
// Undo: // Undo:
$undoRes = $this->getDatabaseConnection()->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $this->getDatabaseConnection()->fullQuoteStr($this->firstEl['table'], 'sys_history') . ' AND recuid=' . (int)$this->firstEl['uid'], '', 'tstamp DESC', '1'); $undoRes = $this->getDatabaseConnection()->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $this->getDatabaseConnection()->fullQuoteStr($this->firstEl['table'], 'sys_history') . ' AND recuid=' . (int)$this->firstEl['uid'], '', 'tstamp DESC', '1');
...@@ -1159,7 +1159,7 @@ class EditDocumentController { ...@@ -1159,7 +1159,7 @@ class EditDocumentController {
) )
) )
) . '; return false;'; ) . '; return false;';
$buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>'; $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL)->render() . '</a>';
} }
if ($this->getNewIconMode($this->firstEl['table'], 'showHistory')) { if ($this->getNewIconMode($this->firstEl['table'], 'showHistory')) {
$aOnClick = 'window.location.href=' . $aOnClick = 'window.location.href=' .
...@@ -1172,11 +1172,11 @@ class EditDocumentController { ...@@ -1172,11 +1172,11 @@ class EditDocumentController {
) )
) )
) . '; return false;'; ) . '; return false;';
$buttons['history'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL) . '</a>'; $buttons['history'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)->render() . '</a>';
} }
// If only SOME fields are shown in the form, this will link the user to the FULL form: // If only SOME fields are shown in the form, this will link the user to the FULL form:
if ($this->columnsOnly) { if ($this->columnsOnly) {
$buttons['columns_only'] = '<a href="' . htmlspecialchars(($this->R_URI . '&columnsOnly=')) . '" title="' . $lang->getLL('editWholeRecord', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL) . '</a>'; $buttons['columns_only'] = '<a href="' . htmlspecialchars(($this->R_URI . '&columnsOnly=')) . '" title="' . $lang->getLL('editWholeRecord', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
} }
} }
} }
......
...@@ -119,7 +119,7 @@ class CreateFolderController { ...@@ -119,7 +119,7 @@ class CreateFolderController {
// Setting the title and the icon // Setting the title and the icon
/** @var IconFactory $iconFactory */ /** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class); $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$icon = $iconFactory->getIcon('apps-filetree-root', Icon::SIZE_SMALL); $icon = $iconFactory->getIcon('apps-filetree-root', Icon::SIZE_SMALL)->render();
$this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier()); $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
// Setting template object // Setting template object
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class); $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
...@@ -285,7 +285,7 @@ class CreateFolderController { ...@@ -285,7 +285,7 @@ class CreateFolderController {
$iconFactory = GeneralUtility::makeInstance(IconFactory::class); $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
// Back // Back
if ($this->returnUrl) { if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>'; $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)->render() . '</a>';
} }
// Add the HTML as a section: // Add the HTML as a section:
$markerArray = array( $markerArray = array(
......
...@@ -114,7 +114,7 @@ class EditFileController { ...@@ -114,7 +114,7 @@ class EditFileController {
// Setting the title and the icon