forked from lochmueller/static_info_tables_zh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.ext_update.php
32 lines (25 loc) · 1010 Bytes
/
class.ext_update.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
<?php
use SJBR\StaticInfoTables\Cache\ClassCacheManager;
use SJBR\StaticInfoTables\Utility\DatabaseUpdateUtility;
class ext_update {
/**
* Main function, returning the HTML content
*
* @return string HTML
*/
function main() {
$content = '';
$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
/** @var ClassCacheManager $classCacheManager */
$classCacheManager = $objectManager->get('SJBR\\StaticInfoTables\\Cache\\ClassCacheManager');
$classCacheManager->reBuild();
/** @var DatabaseUpdateUtility $databaseUpdateUtility */
$databaseUpdateUtility = $objectManager->get('SJBR\\StaticInfoTables\\Utility\\DatabaseUpdateUtility');
$databaseUpdateUtility->doUpdate('static_info_tables_zh');
$content .= '<p>' . \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('updateLanguageLabels', 'StaticInfoTables', ['static_info_tables_zh']) . '.</p>';
return $content;
}
function access() {
return TRUE;
}
}