Skip to content

Commit 12edc0e

Browse files
committed
Add the BE_USER global as TYPO3 bridge service
1 parent e0d17ab commit 12edc0e

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
=========
44

5+
0.3.5
6+
=====
7+
8+
* Add the ``BE_USER`` global as TYPO3 bridge service
9+
510
0.3.4
611
=====
712

docs/globals.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ the TSFE as ``typo3.page_repository`` and the ``cObj`` on the TSFE as
1515

1616
The ``TYPO3_DB`` is available as ``typo3.db`` service.
1717

18+
The ``BE_USER`` is available as ``typo3.backend_user`` service.
19+
1820
The ``TYPO3\CMS\Core\Resource\FileRepository`` for the FAL is available as
1921
``typo3.file_repository``.
2022

@@ -35,18 +37,18 @@ Instead you can create services from TYPO3 globals with the factory pattern:
3537
.. code-block:: yaml
3638
3739
services:
38-
app.typo3.backend_user:
39-
class: TYPO3\CMS\Core\Authentication\BackendUserAuthentication
40+
app.typo3.frontend_user:
41+
class: TYPO3\CMS\Core\Authentication\FrontendUserAuthentication
4042
factory: ["@typo3", getGlobal]
4143
arguments:
42-
- BE_USER
44+
- FE_USER
4345
4446
.. code-block:: xml
4547
4648
<services>
47-
<service id="app.typo3.backend_user" class="TYPO3\CMS\Core\Authentication\BackendUserAuthentication">
49+
<service id="app.typo3.frontend_user" class="TYPO3\CMS\Core\Authentication\FrontendUserAuthentication">
4850
<factory service="typo3" method="getGlobal"/>
49-
<argument>BE_USER</argument>
51+
<argument>FE_USER</argument>
5052
</service>
5153
</services>
5254
@@ -56,14 +58,14 @@ Instead you can create services from TYPO3 globals with the factory pattern:
5658
use Symfony\Component\ExpressionLanguage\Expression;
5759
5860
$definition = new Definition(
59-
'TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication',
60-
['BE_USER']
61+
'TYPO3\\CMS\\Core\\Authentication\\FrontendUserAuthentication',
62+
['FE_USER']
6163
]);
6264
$definition->setFactory([
6365
new Reference('typo3'),
6466
'getGlobal'
6567
]);
66-
$container->setDefinition('app.typo3.backend_user', $definition);
68+
$container->setDefinition('app.typo3.frontend_user', $definition);
6769
6870
The same it possible with classes from ``GeneralUtility::makeInstance()``, but
6971
the must be set shared to false, so ``makeInstance()`` is still in control

src/Kernel/Kernel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
*/
4343
abstract class Kernel extends BaseKernel
4444
{
45-
const VERSION = '0.3.4';
46-
const VERSION_ID = '00304';
45+
const VERSION = '0.3.5';
46+
const VERSION_ID = '00305';
4747
const MAJOR_VERSION = '0';
4848
const MINOR_VERSION = '3';
49-
const RELEASE_VERSION = '4';
49+
const RELEASE_VERSION = '5';
5050
const EXTRA_VERSION = '';
5151

5252
/**

src/Resources/config/services.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646

4747
<service id="typo3" class="Bartacus\Bundle\BartacusBundle\Typo3\BartacusTypo3Bridge"/>
4848

49+
<service id="typo3.backend_user" class="TYPO3\CMS\Core\Authentication\BackendUserAuthentication">
50+
<factory service="typo3" method="getGlobal"/>
51+
<argument>BE_USER</argument>
52+
</service>
53+
4954
<service id="typo3.cache.cache_manager" class="TYPO3\CMS\Core\Cache\CacheManager" shared="false">
5055
<factory service="typo3" method="makeInstance"/>
5156
<argument>TYPO3\CMS\Core\Cache\CacheManager</argument>

0 commit comments

Comments
 (0)