-
Notifications
You must be signed in to change notification settings - Fork 174
/
ext_tables.php
50 lines (46 loc) · 1.82 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
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
call_user_func(
function () {
/**
* Table description files for localization and allowing powermail tables on pages of type default
*/
$tables = [
\In2code\Powermail\Domain\Model\Form::TABLE_NAME,
\In2code\Powermail\Domain\Model\Page::TABLE_NAME,
\In2code\Powermail\Domain\Model\Field::TABLE_NAME,
\In2code\Powermail\Domain\Model\Mail::TABLE_NAME,
\In2code\Powermail\Domain\Model\Answer::TABLE_NAME
];
foreach ($tables as $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
$table,
'EXT:powermail/Resources/Private/Language/locallang_csh_' . $table . '.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages($table);
}
/**
* Garbage Collector
*/
$tgct = 'TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask';
$tables = [
\In2code\Powermail\Domain\Model\Mail::TABLE_NAME,
\In2code\Powermail\Domain\Model\Answer::TABLE_NAME
];
foreach ($tables as $table) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][$tgct]['options']['tables'][$table] = [
'dateField' => 'tstamp',
'expirePeriod' => 30
];
}
/**
* Search with TYPO3 backend search
* search for an email: "#mail:senderemail"
* search for a form: "#form:contactform"
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['mail'] = 'tx_powermail_domain_model_mail';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['form'] = 'tx_powermail_domain_model_form';
}
);