forked from t3brightside/form_pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
36 lines (30 loc) · 1.41 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
<?php
defined('TYPO3_MODE') || die('Access denied.');
if(!class_exists('\Mpdf\Mpdf')){
$composerAutoloadFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('form_pdf')
. 'Resources/Private/PHP/autoload.php';
if(file_exists($composerAutoloadFile)) {
require_once($composerAutoloadFile);
}
}
// Add PDF cleanup task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\Brightside\FormPdf\Task\CleanerTask::class] = [
'extension' => 'form_pdf',
'title' => 'LLL:EXT:form_pdf/Resources/Private/Language/locallang.xlf:form_pdf.tasks.cleaner.name',
'description' => 'LLL:EXT:form_pdf/Resources/Private/Language/locallang.xlf:form_pdf.tasks.cleaner.description',
'additionalFields' => \Brightside\FormPdf\Task\CleanerFieldProvider::class
];
$boot = function () {
if (TYPO3_MODE === 'BE') {
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'pdf-finisher',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:form_pdf/Resources/Public/Icons/Extension.svg']
);
}
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['pdfform'] = \Brightside\FormPdf\Ajax\PdfResponse::class . '::processRequest';
};
$boot();
unset($boot);