-
-
Notifications
You must be signed in to change notification settings - Fork 358
/
ext_tables.php
35 lines (29 loc) · 1.67 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
<?php
use GeorgRinger\News\Domain\Model\Dto\EmConfiguration;
use GeorgRinger\News\Hooks\ItemsProcFunc;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
$boot = static function (): void {
$configuration = GeneralUtility::makeInstance(EmConfiguration::class);
// Extend user settings
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['newsoverlay'] = [
'label' => 'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:usersettings.overlay',
'type' => 'select',
'itemsProcFunc' => ItemsProcFunc::class . '->user_categoryOverlay',
];
if (!isset($GLOBALS['TYPO3_USER_SETTINGS']['showitem'])) {
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = '';
}
ExtensionManagementUtility::addFieldsToUserSettings('--div--;LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:pi1_title,newsoverlay');
// Add tables to livesearch (e.g. "#news:fo" or "#newscat:fo")
$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['news'] = 'tx_news_domain_model_news';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['newstag'] = 'tx_news_domain_model_tag';
/* ===========================================================================
Default configuration
=========================================================================== */
$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['orderByCategory'] = 'uid,title,tstamp,sorting';
$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['orderByNews'] = 'tstamp,datetime,crdate,title' . ($configuration->getManualSorting() ? ',sorting' : '');
$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['orderByTag'] = 'tstamp,crdate,title';
};
$boot();
unset($boot);