Commit Graph

6 Commits

Author SHA1 Message Date
Marcel Kapfer 8264969c61
Use Context API to check for logged in backend user
The `isBackendUserLoggedIn()` function of the TSFE array is deprecated
starting with TYPO3 v12 and since the Context API also provides the
necssary aspect and functionality in v11 there is no harm in migrating
now.

Refs: #2
2023-05-06 12:55:57 +02:00
Marcel Kapfer 09f9578d20
♻️ Use already existing asset collector
For some reason the AssetCollector instance created (or passed) in the
PageRendererPreProcess constructor was not used, but instead a new
instance was made as part of the addLibrary function.

This commit refactors PageRendererPreProcess::addLibrary to use the
already created AssetCollector.
2022-08-10 18:48:26 +02:00
Marcel Kapfer 9c43bfc8f5
🐛 Fix runtime crash if $GLOBALS: TSFE is not set on PHP 8 and higher
This is the case for the backend.

Setting it to null yields to an early abortion in the addLibrary
function.
2022-08-10 18:46:22 +02:00
Marcel Kapfer 01c8997c1d
⚰️ Remove unused use statement in PageRendererPreProcess 2022-08-10 18:45:33 +02:00
Marcel Kapfer 7d22f3569b
Don't add script if logged into BE 2021-05-03 19:48:34 +02:00
Marcel Kapfer 1bfb8a1a77
Initial commit 2021-04-11 13:41:47 +02:00