forked from TYPO3-Headless/headless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
38 lines (33 loc) · 1.36 KB
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
* This file is part of the "headless" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
defined('TYPO3_MODE') || die();
call_user_func(
static function () {
$features = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\Features::class);
$typo3Version = new TYPO3\CMS\Core\Information\Typo3Version();
if ($features->isFeatureEnabled('headless.frontendUrls')) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass'][] = \FriendsOfTYPO3\Headless\Hooks\PreviewUrlHook::class;
}
if ($features->isFeatureEnabled('headless.jsonViewModule')) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Headless',
'web',
'jsonview',
'bottom',
[
\FriendsOfTYPO3\Headless\Controller\JsonViewController::class => 'main'
],
[
'access' => 'admin',
'icon' => 'EXT:headless/Resources/Public/Icons/module-jsonview.svg',
'labels' => 'LLL:EXT:headless/Resources/Private/Language/locallang_mod.xlf'
]
);
}
}
);