Skip to content

Commit

Permalink
Cleanup fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Jan 8, 2024
1 parent f6d0d74 commit e97859d
Show file tree
Hide file tree
Showing 90 changed files with 671 additions and 671 deletions.
4 changes: 2 additions & 2 deletions Configuration/RequestMiddlewares.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'frontend' => [
'dmk/mkforms/ajax-handler' => [
'target' => \DMK\MkForms\Middleware\AjaxHandler::class,
'target' => DMK\MkForms\Middleware\AjaxHandler::class,
'after' => [
'typo3/cms-frontend/prepare-tsfe-rendering',
],
Expand All @@ -12,7 +12,7 @@
],
],
'dmk/mkforms/header-injection' => [
'target' => \DMK\MkForms\Middleware\HeaderInjection::class,
'target' => DMK\MkForms\Middleware\HeaderInjection::class,
'after' => [
'typo3/cms-frontend/tsfe',
],
Expand Down
6 changes: 3 additions & 3 deletions Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkforms', 'static/ts/', 'MKFORMS - Basics');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkforms', 'static/prototype/', 'MKFORMS Prototype-JS');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkforms', 'static/jquery/', 'MKFORMS JQuery-JS');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkforms', 'static/ts/', 'MKFORMS - Basics');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkforms', 'static/prototype/', 'MKFORMS Prototype-JS');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkforms', 'static/jquery/', 'MKFORMS JQuery-JS');
4 changes: 2 additions & 2 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['tx_mkforms'] = 'pi_flexform';

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('tx_mkforms', 'FILE:EXT:mkforms/flexform_main.xml');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('tx_mkforms', 'FILE:EXT:mkforms/flexform_main.xml');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:mkforms/Resources/Private/Language/locallang_db.xlf:plugin.mkforms.label',
'tx_mkforms',
Expand Down
12 changes: 6 additions & 6 deletions action/class.tx_mkforms_action_FormBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @author Michael Wagner
*/
class tx_mkforms_action_FormBase extends \Sys25\RnBase\Frontend\Controller\AbstractAction
class tx_mkforms_action_FormBase extends Sys25\RnBase\Frontend\Controller\AbstractAction
{
/**
* Form data.
Expand Down Expand Up @@ -157,7 +157,7 @@ protected function configCheck(&$configurations, $confId)
$this->errors[] = 'No XML file found (TS: '.$confId.'xml).';
}
// existiert das xml
$absXmlPath = \Sys25\RnBase\Utility\T3General::getFileAbsFileName($xmlPath);
$absXmlPath = Sys25\RnBase\Utility\T3General::getFileAbsFileName($xmlPath);
if (empty($absXmlPath) || !file_exists($absXmlPath)) {
$this->errors[] = 'The given XML file path ('.$xmlPath.') doesn\'t exists.';
}
Expand Down Expand Up @@ -197,7 +197,7 @@ public function processForm($data, &$form, $flattenData = true)
}

// Hook to handle data
\Sys25\RnBase\Utility\Misc::callHook(
Sys25\RnBase\Utility\Misc::callHook(
'mkforms',
'action_formbase_before_processdata',
['data' => &$data],
Expand All @@ -216,7 +216,7 @@ public function processForm($data, &$form, $flattenData = true)
$data = $this->processData($data);

// Hook to handle data
\Sys25\RnBase\Utility\Misc::callHook(
Sys25\RnBase\Utility\Misc::callHook(
'mkforms',
'action_formbase_after_processdata',
['data' => &$data],
Expand Down Expand Up @@ -301,7 +301,7 @@ public function fillForm(array $params, tx_ameosformidable $form, $forceFill = f
}

// Hook to handle data
\Sys25\RnBase\Utility\Misc::callHook(
Sys25\RnBase\Utility\Misc::callHook(
'mkforms',
'action_formbase_before_filldata',
['data' => &$params],
Expand All @@ -311,7 +311,7 @@ public function fillForm(array $params, tx_ameosformidable $form, $forceFill = f
$data = $this->fillData($params);

// Hook to handle data
\Sys25\RnBase\Utility\Misc::callHook(
Sys25\RnBase\Utility\Misc::callHook(
'mkforms',
'action_formbase_after_filldata',
['data' => &$data],
Expand Down
2 changes: 1 addition & 1 deletion action/redirect/class.tx_mkforms_action_redirect_Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function _doTheMagic($aRendered, $sForm)
if (false !== ($mPage = $this->_navConf('/pageid'))) {
$mPage = $this->callRunneable($mPage);
$sUrl = $this->getForm()->getCObj()->typoLink_URL(['parameter' => $mPage]);
if (!\Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sUrl, 'http://') && '' !== trim($GLOBALS['TSFE']->baseUrl)) {
if (!Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sUrl, 'http://') && '' !== trim($GLOBALS['TSFE']->baseUrl)) {
$sUrl = tx_mkforms_util_Div::removeEndingSlash($GLOBALS['TSFE']->baseUrl).'/'.$sUrl;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion action/stepper/class.tx_mkforms_action_stepper_Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function _doTheMagic($aRendered, $sForm)
'AMEOSFORMIDABLE_STEP_HASH' => $this->oForm->_getSafeLock($iStepToGo.$sUid),
];

$sUrl = \Sys25\RnBase\Utility\T3General::getIndpEnv('TYPO3_REQUEST_URL');
$sUrl = Sys25\RnBase\Utility\T3General::getIndpEnv('TYPO3_REQUEST_URL');

if (!is_null($sUrl)) {
header('Location: '.$sUrl);
Expand Down
18 changes: 9 additions & 9 deletions api/class.maindatahandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function groupFileInfoByVariable(&$top, $info, $attr)
*/
public function _GP()
{
return \Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(
return Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(
$this->_G(),
$this->_P()
);
Expand All @@ -142,7 +142,7 @@ public function _GP()
*/
public function _PG()
{
return \Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(
return Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(
$this->_P(),
$this->_G()
);
Expand Down Expand Up @@ -504,13 +504,13 @@ public function _currentEntryId()
if ($this->_isSubmitted() && !$this->_isClearSubmitted()) {
$form_id = $this->getForm()->formid;

$aPost = \Sys25\RnBase\Utility\T3General::_POST();
$aPost = Sys25\RnBase\Utility\T3General::_POST();

$aPost = is_array($aPost[$form_id] ?? null) ? $aPost[$form_id] : [];
$aFiles = is_array($GLOBALS['_FILES'][$form_id] ?? null) ? $GLOBALS['_FILES'][$form_id] : [];
$aP = \Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule($aPost, $aFiles);
$aP = Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule($aPost, $aFiles);

\Sys25\RnBase\Utility\T3General::stripSlashesOnArray($aP);
Sys25\RnBase\Utility\T3General::stripSlashesOnArray($aP);

if (array_key_exists('AMEOSFORMIDABLE_ENTRYID', $aP) && '' !== trim($aP['AMEOSFORMIDABLE_ENTRYID'])) {
return (int) $aP['AMEOSFORMIDABLE_ENTRYID'];
Expand Down Expand Up @@ -630,7 +630,7 @@ public function i18n_getChildRecords($iParentUid)
if (false !== ($sTableName = $this->tableName())) {
$aRecords = [];

$rows = \Sys25\RnBase\Database\Connection::getInstance()->doSelect(
$rows = Sys25\RnBase\Database\Connection::getInstance()->doSelect(
'*',
$sTableName,
['where' => "l18n_parent='".$iParentUid."'"]
Expand Down Expand Up @@ -660,7 +660,7 @@ public function getT3Languages()
if (false === $this->aT3Languages) {
$this->aT3Languages = [];

$databaseConnection = \Sys25\RnBase\Database\Connection::getInstance();
$databaseConnection = Sys25\RnBase\Database\Connection::getInstance();
$rows = $databaseConnection->doSelect(
'*',
'sys_language',
Expand Down Expand Up @@ -962,7 +962,7 @@ public function getRdtValue_noSubmit_edit($sAbsName)
$oDataSet = $this->getForm()->getWidget($sAbsName)->dbridged_getCurrentDsetObject();

// sure that dataset is anchored, as we already tested it to be in noSubmit_edit
$aData = \Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(// allowing GET to set values
$aData = Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(// allowing GET to set values
$oDataSet->getData(),
$this->_G()
);
Expand All @@ -988,7 +988,7 @@ public function getRdtValue_noSubmit_edit($sAbsName)
$aStored = $this->_getStoredData();

if (is_array($aStored)) {
$aData = \Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(// allowing GET to set values
$aData = Sys25\RnBase\Utility\Arrays::mergeRecursiveWithOverrule(// allowing GET to set values
$aStored,
$this->_G()
);
Expand Down
16 changes: 8 additions & 8 deletions api/class.mainrenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function _wrapIntoForm($html)

$wrapForm = ['', ''];
if (false !== ($sWrap = $oForm->getConfigXML()->get('/meta/form/wrap'))) {
$wrapForm = \Sys25\RnBase\Utility\T3General::trimExplode('|', $sWrap);
$wrapForm = Sys25\RnBase\Utility\T3General::trimExplode('|', $sWrap);
}

if (tx_mkforms_util_Constants::FORM_METHOD_GET === $oForm->getFormMethod()) {
Expand Down Expand Up @@ -176,14 +176,14 @@ protected function getHiddenFieldsForUrlParams(&$url)

if (false !== strpos($url, '?')) {
$params = substr($url, strpos($url, '?') + 1);
$params = \Sys25\RnBase\Utility\T3General::explodeUrl2Array($params);
$params = Sys25\RnBase\Utility\T3General::explodeUrl2Array($params);
$url = substr($url, 0, strpos($url, '?'));
}
// alle Parameter als Hidden Felder bereitstellen
foreach ($params as $name => $value) {
// nur für die Parameter, die nicht zum Formular gehören
// @TODO: die widgets prüfen, nicht nur den parametername!
if (\Sys25\RnBase\Utility\T3General::isFirstPartOfStr($name, $formId.'[')) {
if (Sys25\RnBase\Utility\T3General::isFirstPartOfStr($name, $formId.'[')) {
continue;
}
$name = htmlspecialchars($name);
Expand Down Expand Up @@ -390,7 +390,7 @@ public function _getAjaxEvent(&$oRdt, $aEvent, $sEvent)
if (false !== ($mParams = $this->getForm()->_navConf('/params', $aEvent))) {
if (is_string($mParams)) {
// Das ist der Normalfall. Die Parameter als String
$aTemp = \Sys25\RnBase\Utility\T3General::trimExplode(',', $mParams);
$aTemp = Sys25\RnBase\Utility\T3General::trimExplode(',', $mParams);
reset($aTemp);
foreach ($aTemp as $sParam) {
$aParamsCollection[] = [
Expand All @@ -413,13 +413,13 @@ public function _getAjaxEvent(&$oRdt, $aEvent, $sEvent)

$sParam = $param['get'];
$sAs = $param['as'] ?? null;
if (\Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sParam, 'rowData::')) {
if (Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sParam, 'rowData::')) {
$sParamName = substr($sParam, 9);
$aRowParams[$sParamName] = '';
if (false !== ($sValue = $this->getForm()->getDataHandler()->_getListData($sParamName))) {
$aRowParams[$sParamName] = $sValue;
}
} elseif (\Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sParam, 'rowInput::')) {
} elseif (Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sParam, 'rowInput::')) {
$sParamName = substr($sParam, 10);
/* replacing *id* with *id for this row*; will be handled by JS framework */

Expand All @@ -430,7 +430,7 @@ public function _getAjaxEvent(&$oRdt, $aEvent, $sEvent)
if (array_key_exists($sParamName, $this->getForm()->aORenderlets)) {
$aParams[] = 'rowInput::'.$sAs.'::'.$this->getForm()->getWidget($sParamName)->_getElementHtmlId();
}
} elseif (\Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sParam, 'sys_event.')) {
} elseif (Sys25\RnBase\Utility\T3General::isFirstPartOfStr($sParam, 'sys_event.')) {
$aParams[] = $sParam;
} elseif (array_key_exists($sParam, $this->getForm()->aORenderlets)) {
$sAs = (!$sAs) ? $sParam : $sAs;
Expand Down Expand Up @@ -644,7 +644,7 @@ public function renderStyles()
if (true === $this->_defaultFalse('/style/rewrite')) {
if (!tx_mkforms_util_Div::isAbsWebPath($sUrl)) {
$sUrl = tx_mkforms_util_Div::toServerPath($sUrl);
$sStyle = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($sUrl);
$sStyle = TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($sUrl);
$sUrl = false;
}
}
Expand Down
Loading

0 comments on commit e97859d

Please sign in to comment.