|
1 | 1 | <?php
|
2 | 2 | namespace Typoheads\Formhandler\Controller;
|
3 | 3 |
|
| 4 | +use TYPO3\CMS\Core\Log\LogManager; |
4 | 5 | use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
|
5 | 6 | use Typoheads\Formhandler\Component\Manager;
|
6 | 7 | use Typoheads\Formhandler\Utility\Globals;
|
@@ -49,12 +50,11 @@ class Dispatcher extends AbstractPlugin
|
49 | 50 | * Main method of the dispatcher. This method is called as a user function.
|
50 | 51 | *
|
51 | 52 | * @return string rendered view
|
52 |
| - * @param string $content |
| 53 | + * @param string|null $content |
53 | 54 | * @param array $setup The TypoScript config
|
54 | 55 | */
|
55 | 56 | public function main($content, $setup)
|
56 | 57 | {
|
57 |
| - $this->pi_USER_INT_obj = 1; |
58 | 58 | $this->componentManager = GeneralUtility::makeInstance(Manager::class);
|
59 | 59 | $this->globals = GeneralUtility::makeInstance(Globals::class);
|
60 | 60 | $this->utilityFuncs = GeneralUtility::makeInstance(\Typoheads\Formhandler\Utility\GeneralUtility::class);
|
@@ -113,11 +113,11 @@ public function main($content, $setup)
|
113 | 113 |
|
114 | 114 | $result = $controller->process();
|
115 | 115 | } catch (\Exception $e) {
|
116 |
| - GeneralUtility::sysLog( |
| 116 | + GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__)->error( |
117 | 117 | $e->getFile() . '(' . $e->getLine() . ')' . ' ' . $e->getMessage(),
|
118 |
| - 'formhandler', |
119 |
| - GeneralUtility::SYSLOG_SEVERITY_ERROR |
| 118 | + ['formhandler'] |
120 | 119 | );
|
| 120 | + |
121 | 121 | $result = $this->utilityFuncs->getTranslatedMessage($this->globals->getLangFiles(), 'fe-exception');
|
122 | 122 | if (!$result) {
|
123 | 123 | $result = '<div style="color:red; font-weight: bold">' . $this->utilityFuncs->getExceptionMessage('fe-exception') . '</div>';
|
|
0 commit comments