-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
83 lines (68 loc) · 3 KB
/
ext_localconf.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* --------------------------------------------------------------
* This file is part of the package UniPotsdam\Orcid.
* copyright 2022 by University Potsdam
* https://www.uni-potsdam.de/
*
* GitHub repo: https://github.com/University-of-Potsdam-MM/orcid
*
* Project: Orcid Extension
* Developer: Anuj Sharma (asharma@uni-potsdam.de)
* Developer: Stefanie Lemcke (stefanie.lemcke@uni-potsdam.de)
*
* --------------------------------------------------------------
*/
defined('TYPO3_MODE') || die();
/***************
* PageTS
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . 'orcid' . '/Configuration/TsConfig/Page/NewContentElement.tsconfig">'
);
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
// use same identifier as used in TSconfig for icon
$iconRegistry->registerIcon(
// use same identifier as used in TSconfig for icon
'orcid_icon',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
// font-awesome identifier ('external-link-square')
['source' => 'EXT:'.'orcid' .'/Resources/Public/Icons/orcid.png']
);
if (TYPO3_MODE === 'BE' ) {
$pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Orcid/info');
}
/***************
* Register Scheduler task for Orcid Data
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][UniPotsdam\Orcid\Task\UpdateOrcidDataTask::class] = array(
'extension' => 'orcid',
'title' => 'Update Orcid Data',
'description' => 'Update Orcid data with timestamps older than one day',
'additionalFields' => UniPotsdam\Orcid\Task\UpdateOrcidDataAdditionalFieldProvider::class
);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][UniPotsdam\Orcid\Task\DeleteOrcidDataTask::class] = array(
'extension' => 'orcid',
'title' => 'Delete Orcid Data',
'description' => 'Delete Orcid data, if orcid id is not used anymore.',
);
/***************
* Register for hook to show preview of tt_content element of CType="up_orcid_extension" in page module
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['uporcidext'] = UniPotsdam\Orcid\Hooks\PageLayoutView\NewContentElement::class;
/***************
* Register for hook to save orcid data in typo3 database after creating or updating the orcid content element
*/
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['uporcidext'] = UniPotsdam\Orcid\Hooks\SaveOrcidDataHook::class;
/***************
* Configure the log file
*/
$GLOBALS['TYPO3_CONF_VARS']['LOG']['UniPotsdam']['Orcid']['writerConfiguration'] = [
\TYPO3\CMS\Core\Log\LogLevel::WARNING => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
'logFile' => \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/orcid_error.log'
]
]
];
?>