diff --git a/typo3/sysext/backend/Classes/Controller/BackendController.php b/typo3/sysext/backend/Classes/Controller/BackendController.php index 115f299c4155ce4512b179bd71a5378b4c9d45f9..f31c84d76ca0c484dd590591c48efb0296e0c12c 100644 --- a/typo3/sysext/backend/Classes/Controller/BackendController.php +++ b/typo3/sysext/backend/Classes/Controller/BackendController.php @@ -203,8 +203,24 @@ class BackendController { // Prepare the scaffolding, at this point extension may still add javascript and css $view = $this->getFluidTemplateObject($this->templatePath . 'Backend/Main.html'); - // @todo: kick logo view class and move all logic to Fluid - $view->assign('logo', GeneralUtility::makeInstance(\TYPO3\CMS\Backend\View\LogoView::class)->render()); + + // Render the TYPO3 logo in the left corner + $logoUrl = $GLOBALS['TBE_STYLES']['logo'] ?: 'gfx/typo3-topbar@2x.png'; + $logoPath = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(PATH_typo3 . $logoUrl); + list($logoWidth, $logoHeight) = @getimagesize($logoPath); + + // High-resolution? + if (strpos($logoUrl, '@2x.') !== FALSE) { + $logoWidth = $logoWidth/2; + $logoHeight = $logoHeight/2; + } + + $view->assign('logoUrl', $logoUrl); + $view->assign('logoWidth', $logoWidth); + $view->assign('logoHeight', $logoHeight); + $view->assign('logoLink', TYPO3_URL_GENERAL); + $view->assign('applicationVersion', TYPO3_version); + $view->assign('siteName', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']); $view->assign('moduleMenu', $this->generateModuleMenu()); $view->assign('toolbar', $this->renderToolbar()); diff --git a/typo3/sysext/backend/Classes/View/LogoView.php b/typo3/sysext/backend/Classes/View/LogoView.php index 1fe26f8100b487b1ec386f9397ac6c3ece698992..f54608b5c467c2531605ab81780c9db2922aadd6 100644 --- a/typo3/sysext/backend/Classes/View/LogoView.php +++ b/typo3/sysext/backend/Classes/View/LogoView.php @@ -18,6 +18,7 @@ namespace TYPO3\CMS\Backend\View; * class to render the TYPO3 logo in the backend * * @author Ingo Renner <ingo@typo3.org> + * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - change the logic of the logo directly in the corresponding Fluid template */ class LogoView { @@ -28,8 +29,10 @@ class LogoView { /** * Constructor + * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - change the logic of the logo directly in the corresponding Fluid template */ public function __construct() { + \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction(); $this->logo = 'gfx/typo3-topbar@2x.png'; } diff --git a/typo3/sysext/backend/Resources/Private/Templates/Backend/Main.html b/typo3/sysext/backend/Resources/Private/Templates/Backend/Main.html index 7c8c03bd7004101fcf8ecc0b26fae34c13e5595d..c82fc334460f48da44d2b63537d7a731c4bb7454 100644 --- a/typo3/sysext/backend/Resources/Private/Templates/Backend/Main.html +++ b/typo3/sysext/backend/Resources/Private/Templates/Backend/Main.html @@ -1,6 +1,9 @@ <div class="typo3-topbar-container" role="navigation" id="typo3-top-container"> <div class="typo3-topbar-site"> - <f:format.raw>{logo}</f:format.raw> + <a class="typo3-topbar-site-logo" href="{logoLink}" target="_blank"> + <img src="{logoUrl}" width="{logoWidth}" height="{logoHeight}" title="TYPO3 Content Management System" alt="" /> + </a> + <span class="typo3-topbar-site-name">{siteName} [{applicationVersion}]</span> </div> <div class="typo3-topbar-navigation" id="typo3-topbar-navigation"> <ul class="typo3-topbar-navigation-items" data-typo3-role="typo3-module-menu"> diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-66065-BackendLogoViewDeprecated.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-66065-BackendLogoViewDeprecated.rst new file mode 100644 index 0000000000000000000000000000000000000000..06cb8393fb3dceee22ae31bce499dede253eacb7 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-66065-BackendLogoViewDeprecated.rst @@ -0,0 +1,29 @@ +================================================== +Deprecation - #66065: Backend Logo View Deprecated +================================================== + +Description +=========== + +The logo view class responsible for the rendering of the TYPO3 Logo in the left corner of the backend is not in use +anymore and marked for deprecation. The logic for exchanging the logo via TBE_STYLES is still available. + + +Impact +====== + +Installations extending ``TYPO3\CMS\Backend\View\LogoView`` as an XCLASS will not see +any modified output instead. + + +Affected Installations +====================== + +Installations extending ``TYPO3\CMS\Backend\View\LogoView`` as an XCLASS. + + +Migration +========= + +As the same logic is now done in the BackendController and the main Backend Fluid Template, the template can be +modified to fit the installations' needs.