Merge pull request #8 from DanielSiepmann/feature/remove-deprecations

Remove deprecations
This commit is contained in:
Benni Mack 2020-04-01 12:07:35 +02:00 committed by GitHub
commit 85bd05346c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 14 deletions

View file

@ -71,6 +71,7 @@ class FrontendEditPanel
$this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); $this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
$this->cObj->start([]); $this->cObj->start([]);
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->getLanguageService()->includeLLFile('EXT:core/Resources/Private/Language/locallang_tsfe.xlf');
} }
/** /**
@ -371,23 +372,13 @@ class FrontendEditPanel
} }
/** /**
* Returns the label for key. If a translation for the language set in $this->uc['lang'] * Returns htmlescaped label for key.
* is found that is returned, otherwise the default value.
* If the global variable $LOCAL_LANG is NOT an array (yet) then this function loads
* the global $LOCAL_LANG array with the content of "EXT:core/Resources/Private/Language/locallang_tsfe.xlf"
* such that the values therein can be used for labels in the Admin Panel
* *
* @param string $key Key for a label in the $GLOBALS['LOCAL_LANG'] array of "EXT:core/Resources/Private/Language/locallang_tsfe.xlf * @param string $key Localization key as accepted by LanguageService
* @return string The value for the $key * @return string The value for the $key
*/ */
protected function getLabel(string $key): string protected function getLabel(string $key): string
{ {
if (!is_array($GLOBALS['LOCAL_LANG'])) {
$this->getLanguageService()->includeLLFile('EXT:core/Resources/Private/Language/locallang_tsfe.xlf');
if (!is_array($GLOBALS['LOCAL_LANG'])) {
$GLOBALS['LOCAL_LANG'] = [];
}
}
return htmlspecialchars($this->getLanguageService()->getLL($key)); return htmlspecialchars($this->getLanguageService()->getLL($key));
} }

View file

@ -31,7 +31,7 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
/** /**
* Admin Panel Edit Module * Admin Panel Edit Module
*/ */
class EditModule extends AbstractModule implements PageSettingsProviderInterface, InitializableInterface, ResourceProviderInterface class EditModule extends AbstractModule implements PageSettingsProviderInterface, RequestEnricherInterface, ResourceProviderInterface
{ {
/** /**
* @var UriBuilder * @var UriBuilder
@ -128,8 +128,9 @@ class EditModule extends AbstractModule implements PageSettingsProviderInterface
* Includes the frontend edit initialization * Includes the frontend edit initialization
* *
* @param ServerRequestInterface $request * @param ServerRequestInterface $request
* @return ServerRequestInterface
*/ */
public function initializeModule(ServerRequestInterface $request): void public function enrich(ServerRequestInterface $request): ServerRequestInterface
{ {
} }

View file

@ -199,6 +199,7 @@ class EditToolbarService
->setMaxResults(1) ->setMaxResults(1)
->execute() ->execute()
->fetch(); ->fetch();
// @extensionScannerIgnoreLine At least in v10 this is a false positive
$tsfe->sys_page->versionOL('pages', $row); $tsfe->sys_page->versionOL('pages', $row);
if (is_array($row)) { if (is_array($row)) {
$link = (string)$uriBuilder->buildUriFromRoute( $link = (string)$uriBuilder->buildUriFromRoute(