[TASK] Replace icon by the IconFactory actions-view-go-back 09/43109/2
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 7 Sep 2015 21:39:16 +0000 (23:39 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 8 Sep 2015 06:02:31 +0000 (08:02 +0200)
Resolves: #69595
Releases: master
Change-Id: I1190490dfa23cdc206f1cffbd7975ef9d668c786
Reviewed-on: http://review.typo3.org/43109
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Controller/ContentElement/ElementHistoryController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
typo3/sysext/backend/Classes/Controller/File/FileUploadController.php
typo3/sysext/backend/Classes/Controller/File/RenameFileController.php
typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index fef7289..711cb61 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\ResponseInterface;
 use TYPO3\CMS\Core\Http\Response;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -131,7 +133,8 @@ class ElementHistoryController implements \TYPO3\CMS\Core\Http\ControllerInterfa
                // Start history object
                $historyObj = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\History\RecordHistory::class);
                if ($historyObj->returnUrl) {
-                       $buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                }
                return $buttons;
        }
index 1a6536a..688e768 100644 (file)
@@ -494,7 +494,7 @@ class ElementInformationController implements \TYPO3\CMS\Core\Http\ControllerInt
                if ($returnUrl) {
                        $backLink .= '
                                <a class="btn btn-primary" href="' . htmlspecialchars($returnUrl) . '>
-                                       ' . IconUtility::getSpriteIcon('actions-view-go-back') . '
+                                       ' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '
                                        ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:back', TRUE) . '
                                </a>';
                }
index a9d8fa0..99af37b 100644 (file)
@@ -272,6 +272,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface
                        'csh' => '',
                        'back' => ''
                );
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                if ($this->page_id) {
                        if ((string)$this->table == 'pages') {
                                $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages');
@@ -279,7 +280,7 @@ class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface
                                $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs');
                        }
                        if ($this->R_URI) {
-                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                        }
                }
                return $buttons;
index 97c8e83..fbe68e7 100644 (file)
@@ -19,6 +19,8 @@ use Psr\Http\Message\ResponseInterface;
 use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 
@@ -339,10 +341,11 @@ class NewContentElementController implements \TYPO3\CMS\Core\Http\ControllerInte
                        'csh' => '',
                        'back' => ''
                );
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                if ($this->id && $this->access) {
                        $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce');
                        if ($this->R_URI) {
-                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                        }
                }
                return $buttons;
index b5a7811..0e520b5 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
@@ -234,9 +236,10 @@ class CreateFolderController implements \TYPO3\CMS\Core\Http\ControllerInterface
                $docHeaderButtons = array(
                        'back' => ''
                );
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                // Back
                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) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</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) . '</a>';
                }
                // Add the HTML as a section:
                $markerArray = array(
index ec8dd56..823b7b4 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
@@ -134,7 +136,8 @@ class FileUploadController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                );
                // Back
                if ($this->returnUrl) {
-                       $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                }
                $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
                $this->content .= $this->doc->endPage();
index 525cfda..19c6a90 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
@@ -162,7 +164,8 @@ class RenameFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                $docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename');
                // Back
                if ($this->returnUrl) {
-                       $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                }
                // Add the HTML as a section:
                $markerArray = array(
index efb0bc5..c7ffde4 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Backend\Controller\File;
 use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException;
 use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
@@ -186,9 +188,10 @@ class ReplaceFileController implements \TYPO3\CMS\Core\Http\ControllerInterface
                $docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename');
                // Back
                if ($this->returnUrl) {
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        $docHeaderButtons['back'] = '<a href="' . htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl))
                                . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">'
-                               . IconUtility::getSpriteIcon('actions-view-go-back')
+                               . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL)
                                . '</a>';
                }
                // Add the HTML as a section:
index 0aebdb4..8cec9a8 100644 (file)
@@ -329,7 +329,7 @@ class NewRecordController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                }
                // Back
                if ($this->R_URI) {
-                       $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                       $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                }
                if (is_array($this->pageinfo) && $this->pageinfo['uid']) {
                        // View
index 71cf836..217a494 100644 (file)
@@ -325,7 +325,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                                $href = htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl, array('id' => $this->id)));
                                $buttons['back'] = '<a href="' . $href . '" class="typo3-goBack" title="'
                                        . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">'
-                                       . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                                       . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                        }
                }
                return $buttons;
index 04e4416..c81753c 100755 (executable)
@@ -316,7 +316,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
                                                'id' => $this->id
                                        );
                                        $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
-                                       $buttons['back'] = '<a href="' . htmlspecialchars($aHref) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                                       $buttons['back'] = '<a href="' . htmlspecialchars($aHref) . '" class="typo3-goBack" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                                }
                        }
                        // Shortcut