69 lines
2.0 KiB
PHP
69 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\Settings;
|
|
|
|
use HermannTelser\Gutachten\Berechnungen\Berechnung;
|
|
use HermannTelser\Gutachten\DB\DbFunction;
|
|
use HermannTelser\Gutachten\Utility\Message;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
use TYPO3\CMS\Frontend\Utility\EidUtility;
|
|
|
|
/***
|
|
*
|
|
* This file is part of the "NuhOdds Comparatore" Extension for TYPO3 CMS.
|
|
*
|
|
* For the full copyright and license information, please read the
|
|
* LICENSE.txt file that was distributed with this source code.
|
|
*
|
|
* (c) 2019 Hermann Telser <hermann.telser@gmail.com>, NUH-Odds GmbH
|
|
*
|
|
***/
|
|
|
|
class _SettingsController
|
|
{
|
|
public function __construct()
|
|
{
|
|
$arr = [];
|
|
switch (GeneralUtility::_GP('action')) {
|
|
// SETTINGS
|
|
case 'load_localscope':
|
|
$arr = [];
|
|
$feUserObj = EidUtility::initFEuser();
|
|
$arr['uid'] = $feUserObj->user['uid'];
|
|
$arr['username'] = $feUserObj->user['first_name'];
|
|
$arr['tx_help'] = $feUserObj->user['tx_help'];
|
|
break;
|
|
case 'toggle_theme':
|
|
ToggleTheme::toggle();
|
|
exit;
|
|
case 'toggle_help_onoff':
|
|
ToggleHelp::toggle();
|
|
exit;
|
|
case 'tooltip':
|
|
$id = GeneralUtility::_GP('id');
|
|
echo DbFunction::get('tx_gutachten_tooltip', 'tip', ['id' => GeneralUtility::_GP('id')]);
|
|
exit;
|
|
break;
|
|
case 'textedit':
|
|
TextEdit::update();
|
|
Berechnung::berechnen();
|
|
echo 1;
|
|
exit;
|
|
break;
|
|
case 'sonderzeichen':
|
|
Sonderzeichen::run();
|
|
break;
|
|
default:
|
|
Message::error(
|
|
__FILE__,
|
|
__LINE__,
|
|
'no controller switch defined'
|
|
);
|
|
}
|
|
|
|
header('Content-Type: application/json');
|
|
echo json_encode($arr);
|
|
exit();
|
|
}
|
|
}
|