-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
59 lines (50 loc) · 2.42 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
defined('TYPO3_MODE') || die('Access denied.');
if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) {
// remove some reports to prevent unneeded report-mails
$reportProviders =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers'];
if (is_array($reportProviders['fal'])) {
// FAL Status reports missing files. Currently there is no possibility to remove those marked-as-missing files:
// https://forge.typo3.org/issues/59312
// Solution: Disable Report
$reportProviders['fal'] = array_filter($reportProviders['fal'], function($class) {
return $class != \TYPO3\CMS\Reports\Report\Status\FalStatus::class;
});
}
if (is_array($reportProviders['system'])) {
// System Status reports some php settings as warnings which we cannot change.
// Examples include max_execution_time and xdebug.max_nesting_level
$reportProviders['system'] = array_filter($reportProviders['system'], function($class) {
return $class != \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class;
});
}
unset($reportProviders);
}
// Add custom Icons
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$path = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:vierwd_base/Resources/Public/Icons/');
foreach (new \GlobIterator($path . '*.svg') as $icon) {
$iconRegistry->registerIcon('vierwd-' . $icon->getBasename('.svg'), \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, [
'source' => 'EXT:vierwd_base/Resources/Public/Icons/' . $icon->getFilename(),
]);
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_vierwdbase_hyphenation');
\Vierwd\VierwdBase\Hooks\ContentElements::addFCEs('vierwd_base');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:vierwd_base/Configuration/PageTSconfig/page.ts">');
if (TYPO3_MODE === 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'VierwdBase',
'tools', // Make module a submodule of 'tools'
'translationstate', // Submodule key
'', // Position
[
\Vierwd\VierwdBase\Controller\TranslationStatusController::class => 'index',
],
[
'access' => 'admin',
'icon' => 'EXT:vierwd_base/Resources/Public/Icons/translation-status.svg',
'labels' => 'LLL:EXT:vierwd_base/Resources/Private/Language/locallang_mod.xlf',
'name' => 'tools_TranslationStatus',
]
);
}