From 07d981920bc8fe9e4296fe37dc053988bb4bf79b Mon Sep 17 00:00:00 2001 From: Franz Holzinger Date: Fri, 16 Feb 2024 14:09:31 +0100 Subject: [PATCH] use spelling funcTablename instead of functablename --- ChangeLog | 2 +- Classes/Api/ParameterApi.php | 12 +- Classes/Api/PluginApi.php | 8 +- Classes/Hooks/TransactorListener.php | 2 +- api/class.tx_ttproducts_api.php | 6 +- api/class.tx_ttproducts_ts.php | 8 +- .../class.tx_ttproducts_activity_finalize.php | 6 +- .../class.tx_ttproducts_control_basket.php | 4 +- ...s.tx_ttproducts_control_basketquantity.php | 10 +- control/class.tx_ttproducts_control_memo.php | 54 ++++---- .../class.tx_ttproducts_control_product.php | 16 +-- .../class.tx_ttproducts_control_search.php | 4 +- control/class.tx_ttproducts_main.php | 42 +++--- eid/class.tx_ttproducts_db.php | 18 +-- lib/class.tx_ttproducts_config.php | 22 ++-- lib/class.tx_ttproducts_csv.php | 4 +- lib/class.tx_ttproducts_email_div.php | 8 +- lib/class.tx_ttproducts_tables.php | 42 +++--- model/class.tx_ttproducts_account.php | 2 +- model/class.tx_ttproducts_address.php | 8 +- model/class.tx_ttproducts_article.php | 6 +- model/class.tx_ttproducts_article_base.php | 8 +- model/class.tx_ttproducts_basket.php | 6 +- model/class.tx_ttproducts_card.php | 4 +- model/class.tx_ttproducts_category.php | 36 +++--- model/class.tx_ttproducts_category_base.php | 16 +-- model/class.tx_ttproducts_content.php | 4 +- model/class.tx_ttproducts_country.php | 4 +- model/class.tx_ttproducts_dam.php | 6 +- model/class.tx_ttproducts_email.php | 4 +- model/class.tx_ttproducts_graduated_price.php | 6 +- model/class.tx_ttproducts_model_control.php | 12 +- model/class.tx_ttproducts_orderaddress.php | 6 +- model/class.tx_ttproducts_product.php | 8 +- model/class.tx_ttproducts_static_tax.php | 4 +- model/class.tx_ttproducts_table_base.php | 18 +-- model/class.tx_ttproducts_text.php | 4 +- model/class.tx_ttproducts_voucher.php | 4 +- .../field/class.tx_ttproducts_field_media.php | 4 +- .../class.tx_ttproducts_article_base_view.php | 14 +- view/class.tx_ttproducts_basketitem_view.php | 16 +-- view/class.tx_ttproducts_cat_view.php | 12 +- view/class.tx_ttproducts_category_view.php | 6 +- view/class.tx_ttproducts_catlist_view.php | 36 +++--- .../class.tx_ttproducts_catlist_view_base.php | 20 +-- view/class.tx_ttproducts_control_view.php | 2 +- view/class.tx_ttproducts_download_view.php | 4 +- ....tx_ttproducts_edit_variant_dummy_view.php | 2 +- .../class.tx_ttproducts_edit_variant_view.php | 10 +- view/class.tx_ttproducts_fal_view.php | 4 +- view/class.tx_ttproducts_list_view.php | 120 +++++++++--------- view/class.tx_ttproducts_memo_view.php | 6 +- view/class.tx_ttproducts_menucat_view.php | 8 +- view/class.tx_ttproducts_order_view.php | 16 +-- .../class.tx_ttproducts_orderaddress_view.php | 2 +- view/class.tx_ttproducts_page_view.php | 6 +- view/class.tx_ttproducts_product_view.php | 6 +- view/class.tx_ttproducts_relatedlist_view.php | 26 ++-- view/class.tx_ttproducts_selectcat_view.php | 8 +- view/class.tx_ttproducts_table_base_view.php | 38 +++--- .../class.tx_ttproducts_field_base_view.php | 6 +- ....tx_ttproducts_field_creditpoints_view.php | 2 +- ...ass.tx_ttproducts_field_datafield_view.php | 12 +- ...lass.tx_ttproducts_field_datetime_view.php | 4 +- ...lass.tx_ttproducts_field_delivery_view.php | 4 +- ...tx_ttproducts_field_foreign_table_view.php | 8 +- ..._ttproducts_field_graduated_price_view.php | 8 +- .../class.tx_ttproducts_field_image_view.php | 4 +- ...class.tx_ttproducts_field_instock_view.php | 2 +- .../class.tx_ttproducts_field_media_view.php | 24 ++-- .../class.tx_ttproducts_field_note_view.php | 2 +- .../class.tx_ttproducts_field_price_view.php | 8 +- .../class.tx_ttproducts_field_tax_view.php | 4 +- .../class.tx_ttproducts_field_text_view.php | 4 +- ...interface.tx_ttproducts_field_view_int.php | 2 +- ...ce.tx_ttproducts_edit_variant_view_int.php | 2 +- 76 files changed, 448 insertions(+), 448 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19ed8b793..19338b2ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -267,7 +267,7 @@ * bugfix issue #74: The FE session has not been stored. 2020-10-09 Franz Holzinger - * bugfix with memo item function: wrong functablename memoItems instead of tt_products + * bugfix with memo item function: wrong funcTablename memoItems instead of tt_products 2020-10-05 Franz Holzinger * bugfix with discountprice: $k3 == 'type' is true with a value of 0. diff --git a/Classes/Api/ParameterApi.php b/Classes/Api/ParameterApi.php index 452225552..1af21d9a2 100644 --- a/Classes/Api/ParameterApi.php +++ b/Classes/Api/ParameterApi.php @@ -110,10 +110,10 @@ public function getParameterTable($parameter = '') return $result; } - public function getPiVarValue($functablename) + public function getPiVarValue($funcTablename) { $piVars = $this->getPiVars(); - $piVar = $this->getPiVar($functablename); + $piVar = $this->getPiVar($funcTablename); $result = false; if ( @@ -199,10 +199,10 @@ public function getPrefixId() return $this->prefixId; } - public function getPiVar($functablename) + public function getPiVar($funcTablename) { $paramsTableArray = $this->getParameterTable(); - $result = array_search($functablename, $paramsTableArray); + $result = array_search($funcTablename, $paramsTableArray); return $result; } @@ -446,7 +446,7 @@ public function getWhereByFields( public function getSearchInfo( $cObj, $searchVars, - $functablename, + $funcTablename, $tablename, &$searchboxWhere, &$bUseSearchboxArray, @@ -519,7 +519,7 @@ public function getSearchInfo( $searchFieldArray['local'] = $tmpArray[1]; $searchFieldArray['foreign'] = ''; - if (self::getPiVar($functablename) == $searchParamArray['local']) { + if (self::getPiVar($funcTablename) == $searchParamArray['local']) { $sqlTableArray['from'] = []; $sqlTableArray['join'] = []; $sqlTableArray['local'] = []; diff --git a/Classes/Api/PluginApi.php b/Classes/Api/PluginApi.php index eefc13a3f..798a0f318 100644 --- a/Classes/Api/PluginApi.php +++ b/Classes/Api/PluginApi.php @@ -392,10 +392,10 @@ public function getRelatedProducts( if ( !empty($funcArray) && - $funcTablename != $funcArray['functablename'] + $funcTablename != $funcArray['funcTablename'] ) { - $relatedItemObj = $tablesObj->get($funcArray['functablename'], false); - $parentFuncTablename = $funcArray['functablename']; + $relatedItemObj = $tablesObj->get($funcArray['funcTablename'], false); + $parentFuncTablename = $funcArray['funcTablename']; } $tableConf = $relatedItemObj->getTableConf($funcArray['code']); $orderBy = ''; @@ -442,7 +442,7 @@ public function getRelatedProducts( $tmpContent = $listView->printView( $templateCode, $funcArray['code'], - $funcArray['functablename'], + $funcArray['funcTablename'], implode(',', $relatedIds), $listPids, '', diff --git a/Classes/Hooks/TransactorListener.php b/Classes/Hooks/TransactorListener.php index c6492781d..c231e7a84 100644 --- a/Classes/Hooks/TransactorListener.php +++ b/Classes/Hooks/TransactorListener.php @@ -213,7 +213,7 @@ public function execute( $this, $templateCode, $mainMarkerArray, - $functablename = 'tt_products', + $funcTablename = 'tt_products', $orderUid, $orderRow, $itemArray, diff --git a/api/class.tx_ttproducts_api.php b/api/class.tx_ttproducts_api.php index 078ae8bb0..1effadd84 100644 --- a/api/class.tx_ttproducts_api.php +++ b/api/class.tx_ttproducts_api.php @@ -497,7 +497,7 @@ public static function finalizeOrder( $pObj, $templateCode, $mainMarkerArray, - $functablename, + $funcTablename, $orderUid, &$orderArray, $itemArray, @@ -695,7 +695,7 @@ public static function finalizeOrder( $csvfilepath = Environment::getPublicPath() . '/' . $conf['CSVdestination']; $csv->create( - $functablename, + $funcTablename, $conf, $itemArray, $calculatedArray, @@ -1389,7 +1389,7 @@ public static function finalizeOrder( $infoViewObj, $templateCode, $basketView, - $functablename, + $funcTablename, $orderUid, $orderConfirmationHTML, $errorMessage, diff --git a/api/class.tx_ttproducts_ts.php b/api/class.tx_ttproducts_ts.php index f2a00fb66..f1caec10c 100644 --- a/api/class.tx_ttproducts_ts.php +++ b/api/class.tx_ttproducts_ts.php @@ -138,8 +138,8 @@ protected function getMemoCount($uid = 0) } if ($bMemoFound) { - $functablename = 'tt_products'; - $memoItems = tx_ttproducts_control_memo::readSessionMemoItems($functablename); + $funcTablename = 'tt_products'; + $memoItems = tx_ttproducts_control_memo::readSessionMemoItems($funcTablename); if ($memoItems != '') { $memoArray = GeneralUtility::trimExplode(',', $memoItems); $count = count($memoArray); @@ -183,10 +183,10 @@ public function pageProductCount_IProcFunc($I, $conf) public function processMemo(): void { - $functablename = 'tt_products'; + $funcTablename = 'tt_products'; $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][TT_PRODUCTS_EXT . '.']; $piVars = GeneralUtility::_GPmerged('tt_products'); - tx_ttproducts_control_memo::process($functablename, $piVars, $conf); + tx_ttproducts_control_memo::process($funcTablename, $piVars, $conf); } } diff --git a/control/class.tx_ttproducts_activity_finalize.php b/control/class.tx_ttproducts_activity_finalize.php index bda531af5..970e5394b 100644 --- a/control/class.tx_ttproducts_activity_finalize.php +++ b/control/class.tx_ttproducts_activity_finalize.php @@ -89,7 +89,7 @@ public function getEmailControlArray( public function doProcessing( $templateCode, $mainMarkerArray, - $functablename, + $funcTablename, $orderUid, &$orderArray, $productRowArray, @@ -157,7 +157,7 @@ public function doProcessing( if (!$bAlwaysInStock) { $emailControlArray = $this->getEmailControlArray($templateCode, $conf, $defaultFromArray); - $itemObj = $tablesObj->get($functablename); + $itemObj = $tablesObj->get($funcTablename); $instockTableArray = $itemObj->reduceInStockItems( $basketObj->getItemArray(), @@ -294,7 +294,7 @@ public function doProcessing( $this, $templateCode, $mainMarkerArray, - $functablename, + $funcTablename, $orderUid, $orderArray, $basketObj->getItemArray(), diff --git a/control/class.tx_ttproducts_control_basket.php b/control/class.tx_ttproducts_control_basket.php index 6ff29c1c3..dd19a0702 100644 --- a/control/class.tx_ttproducts_control_basket.php +++ b/control/class.tx_ttproducts_control_basket.php @@ -909,10 +909,10 @@ public static function getTagName($uid, $fieldname) return $result; } - public static function getAjaxVariantFunction($row, $functablename, $theCode) + public static function getAjaxVariantFunction($row, $funcTablename, $theCode) { if (ExtensionManagementUtility::isLoaded('taxajax')) { - $result = 'doFetchRow(\'' . $functablename . '\',\'' . strtolower($theCode) . '\',' . $row['uid'] . ');'; + $result = 'doFetchRow(\'' . $funcTablename . '\',\'' . strtolower($theCode) . '\',' . $row['uid'] . ');'; } else { $result = ''; } diff --git a/control/class.tx_ttproducts_control_basketquantity.php b/control/class.tx_ttproducts_control_basketquantity.php index cd07a1d22..0e32c802f 100644 --- a/control/class.tx_ttproducts_control_basketquantity.php +++ b/control/class.tx_ttproducts_control_basketquantity.php @@ -67,8 +67,8 @@ public function getQuantityMarkerArray(// deprecated. used only for DAM $basketObj = GeneralUtility::makeInstance('tx_ttproducts_basket'); $quantityArray = $basketObj->getQuantityArray($relatedIds, $rowArray); - foreach ($rowArray as $functablename => $functableRowArray) { - $viewObj = $tablesObj->get($functablename, true); + foreach ($rowArray as $funcTablename => $functableRowArray) { + $viewObj = $tablesObj->get($funcTablename, true); $modelObj = $viewObj->getModelObj(); $marker = $viewObj->getMarker(); @@ -80,10 +80,10 @@ public function getQuantityMarkerArray(// deprecated. used only for DAM if ( isset($quantityArray[$uid]) && is_array($quantityArray[$uid]) && - isset($quantityArray[$uid][$functablename]) && - is_array($quantityArray[$uid][$functablename]) + isset($quantityArray[$uid][$funcTablename]) && + is_array($quantityArray[$uid][$funcTablename]) ) { - $count = strval($quantityArray[$uid][$functablename][$subuid]); + $count = strval($quantityArray[$uid][$funcTablename][$subuid]); if (!isset($count)) { $count = ''; } diff --git a/control/class.tx_ttproducts_control_memo.php b/control/class.tx_ttproducts_control_memo.php index 652418771..39ce80fc5 100644 --- a/control/class.tx_ttproducts_control_memo.php +++ b/control/class.tx_ttproducts_control_memo.php @@ -100,12 +100,12 @@ public static function bUseSession($conf) return $result; } - public static function process($functablename, $piVars, $conf): void + public static function process($funcTablename, $piVars, $conf): void { $bMemoChanged = false; - self::loadMemo($functablename, $conf); + self::loadMemo($funcTablename, $conf); - $memoItems = self::getMemoItems($functablename); + $memoItems = self::getMemoItems($funcTablename); if (!is_array($memoItems)) { $memoItems = []; } @@ -189,15 +189,15 @@ public static function process($functablename, $piVars, $conf): void } if ($bMemoChanged) { - self::saveMemo($functablename, $memoItems, $conf); - self::setMemoItems($functablename, $memoItems); + self::saveMemo($funcTablename, $memoItems, $conf); + self::setMemoItems($funcTablename, $memoItems); } } - public static function getMemoField($functablename, $bFeuser) + public static function getMemoField($funcTablename, $bFeuser) { - if (isset(self::$memoTableFieldArray[$functablename])) { - $result = ($bFeuser ? 'tt_products_' : '') . self::$memoTableFieldArray[$functablename]; + if (isset(self::$memoTableFieldArray[$funcTablename])) { + $result = ($bFeuser ? 'tt_products_' : '') . self::$memoTableFieldArray[$funcTablename]; } else { $result = false; } @@ -205,14 +205,14 @@ public static function getMemoField($functablename, $bFeuser) return $result; } - public static function getMemoItems($functablename) + public static function getMemoItems($funcTablename) { - $result = self::$memoItemArray[$functablename]; + $result = self::$memoItemArray[$funcTablename]; return $result; } - public static function setMemoItems($functablename, $v): void + public static function setMemoItems($funcTablename, $v): void { if (!is_array($v)) { if ($v == '') { @@ -221,15 +221,15 @@ public static function setMemoItems($functablename, $v): void $v = explode(',', $v); } } - self::$memoItemArray[$functablename] = $v; + self::$memoItemArray[$funcTablename] = $v; } - public static function readSessionMemoItems($functablename) + public static function readSessionMemoItems($funcTablename) { $result = ''; $session = tx_ttproducts_control_session::readSessionData(); $tableArray = self::getMemoTableFieldArray(); - $field = $tableArray[$functablename]; + $field = $tableArray[$funcTablename]; if ( $field != '' && @@ -242,10 +242,10 @@ public static function readSessionMemoItems($functablename) return $result; } - public static function readFeUserMemoItems($functablename) + public static function readFeUserMemoItems($funcTablename) { $result = ''; - $feuserField = self::getMemoField($functablename, true); + $feuserField = self::getMemoField($funcTablename, true); if ($GLOBALS['TSFE']->fe_user->user[$feuserField]) { $result = explode(',', $GLOBALS['TSFE']->fe_user->user[$feuserField]); @@ -254,24 +254,24 @@ public static function readFeUserMemoItems($functablename) return $result; } - public static function loadMemo($functablename, $conf): void + public static function loadMemo($funcTablename, $conf): void { $memoItems = ''; // $bFeuser = self::bUseFeuser($conf); - // $theField = self::getMemoField($functablename, $bFeuser); + // $theField = self::getMemoField($funcTablename, $bFeuser); if (self::bUseFeuser($conf)) { - $memoItems = self::readFeUserMemoItems($functablename); + $memoItems = self::readFeUserMemoItems($funcTablename); } else { - $memoItems = self::readSessionMemoItems($functablename); + $memoItems = self::readSessionMemoItems($funcTablename); } - self::setMemoItems($functablename, $memoItems); + self::setMemoItems($funcTablename, $memoItems); } - public static function saveMemo($functablename, $memoItems, $conf): void + public static function saveMemo($funcTablename, $memoItems, $conf): void { $bFeuser = self::bUseFeuser($conf); - $feuserField = self::getMemoField($functablename, $bFeuser); + $feuserField = self::getMemoField($funcTablename, $bFeuser); $fieldsArray = []; $fieldsArray[$feuserField] = implode(',', $memoItems); @@ -287,15 +287,15 @@ public static function saveMemo($functablename, $memoItems, $conf): void public static function copySession2Feuser($params, $pObj, $conf): void { $tableArray = self::getMemoTableFieldArray(); - foreach ($tableArray as $functablename => $type) { - $memoItems = self::readSessionMemoItems($functablename); + foreach ($tableArray as $funcTablename => $type) { + $memoItems = self::readSessionMemoItems($funcTablename); if (!empty($memoItems) && is_array($memoItems)) { - $feuserMemoItems = self::readFeUserMemoItems($functablename); + $feuserMemoItems = self::readFeUserMemoItems($funcTablename); if (isset($feuserMemoItems) && is_array($feuserMemoItems)) { $memoItems = array_merge($feuserMemoItems, $memoItems); } - self::saveMemo($functablename, $memoItems, $conf); + self::saveMemo($funcTablename, $memoItems, $conf); } } } diff --git a/control/class.tx_ttproducts_control_product.php b/control/class.tx_ttproducts_control_product.php index dc6f92d31..8bfb277cc 100644 --- a/control/class.tx_ttproducts_control_product.php +++ b/control/class.tx_ttproducts_control_product.php @@ -47,7 +47,7 @@ public static function getPresetVariantArray( $useArticles ) { $uid = $row['uid']; - $functablename = $itemTable->getFuncTablename(); + $funcTablename = $itemTable->getFuncTablename(); $basketVar = tx_ttproducts_model_control::getBasketVar(); $presetVariantArray = []; @@ -66,11 +66,11 @@ public static function getPresetVariantArray( if ( isset($storedRecs) && is_array($storedRecs) && - isset($storedRecs[$functablename]) && - is_array($storedRecs[$functablename]) && - isset($storedRecs[$functablename][$uid]) + isset($storedRecs[$funcTablename]) && + is_array($storedRecs[$funcTablename]) && + isset($storedRecs[$funcTablename][$uid]) ) { - $variantRow = $storedRecs[$functablename][$uid]; + $variantRow = $storedRecs[$funcTablename][$uid]; $variant = $itemTable->variant->getVariantFromProductRow( $row, @@ -96,10 +96,10 @@ public static function addAjax( $tablesObj, $languageObj, $theCode, - $functablename + $funcTablename ): void { if (ExtensionManagementUtility::isLoaded('taxajax')) { - $itemTable = $tablesObj->get($functablename, false); + $itemTable = $tablesObj->get($funcTablename, false); $selectableVariantFieldArray = $itemTable->variant->getSelectableFieldArray(); $editFieldArray = $itemTable->editVariant->getFieldArray(); @@ -116,7 +116,7 @@ public static function addAjax( $fieldArray = array_merge($fieldArray, $editFieldArray); } - $param = [$functablename => $fieldArray]; + $param = [$funcTablename => $fieldArray]; $bUseColorbox = false; $tableConf = $itemTable->getTableConf($theCode); if ( diff --git a/control/class.tx_ttproducts_control_search.php b/control/class.tx_ttproducts_control_search.php index 6415f50e6..88373ecb6 100644 --- a/control/class.tx_ttproducts_control_search.php +++ b/control/class.tx_ttproducts_control_search.php @@ -228,8 +228,8 @@ public function run($cObj, $pibaseClass, &$errorCode, $content = '') ); break; case 'KEYFIELD': - $functablename = ($this->config['foreign_table'] ?? $this->config['local_table']); - $tableConf = $cnf->getTableConf($functablename, $theCode); + $funcTablename = ($this->config['foreign_table'] ?? $this->config['local_table']); + $tableConf = $cnf->getTableConf($funcTablename, $theCode); if (isset($tableConf['view.']) && is_array($tableConf['view.']) && isset($tableConf['view.']['valueArray.']) && is_array($tableConf['view.']['valueArray.']) diff --git a/control/class.tx_ttproducts_main.php b/control/class.tx_ttproducts_main.php index 80b964789..209535f2d 100644 --- a/control/class.tx_ttproducts_main.php +++ b/control/class.tx_ttproducts_main.php @@ -442,9 +442,9 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax $templateCode = ''; if (!$errorMessage && !count($errorCode)) { - $functablename = 'tt_products'; + $funcTablename = 'tt_products'; tx_ttproducts_control_memo::process( - $functablename, + $funcTablename, $piVars, $conf ); @@ -504,8 +504,8 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax $bHidePlugin = false; - foreach ($tableArray as $functablename) { - $tableConf = $cnf->getTableConf($functablename, $theCode); + foreach ($tableArray as $funcTablename) { + $tableConf = $cnf->getTableConf($funcTablename, $theCode); if (!empty($tableConf)) { $hideIds = ''; $hideChildless = false; @@ -515,7 +515,7 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax $hideIds = $tableConf['hideID']; } - if ($functablename == 'tt_products_cat') { + if ($funcTablename == 'tt_products_cat') { if (isset($tableConf['hideChildless'])) { $hideChildless = (bool)$tableConf['hideChildless']; } @@ -530,7 +530,7 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax $hideZero ) { $hideIdArray = GeneralUtility::trimExplode(',', $hideIds); - $piVar = tx_ttproducts_model_control::getPiVar($functablename); + $piVar = tx_ttproducts_model_control::getPiVar($funcTablename); if (isset($piVars[$piVar])) { $currentArray = GeneralUtility::trimExplode(',', $piVars[$piVar]); @@ -548,8 +548,8 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax if (!$bHidePlugin) { if (isset($piVars[$piVar])) { if ($hideChildless) { - $categoryfunctablename = 'tt_products_cat'; - $categoryTable = $tablesObj->get($categoryfunctablename, false); + $categoryFuncTablename = 'tt_products_cat'; + $categoryTable = $tablesObj->get($categoryFuncTablename, false); foreach ($currentArray as $currentUid) { $childs = $categoryTable->getAllChildCats( @@ -641,9 +641,9 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax if (substr($theCode, -2, 2) == 'AD') { $tablename = ''; - $functablename = 'address'; + $funcTablename = 'address'; if (is_array($conf['table.'])) { - $tablename = $conf['table.'][$functablename]; + $tablename = $conf['table.'][$funcTablename]; } $addressExtKeyTable = tx_ttproducts_control_address::getAddressExtKeyTable(); @@ -661,12 +661,12 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax $errorMessage = $messageArr[0] . 'table.address' . $messageArr[1]; } } elseif (substr($theCode, -6, 6) == 'DAMCAT') { - $functablename = 'tx_dam_cat'; + $funcTablename = 'tx_dam_cat'; } elseif (substr($theCode, -3, 3) == 'CAT') { if ($this->pageAsCategory) { - $functablename = 'pages'; + $funcTablename = 'pages'; } else { - $functablename = 'tt_products_cat'; + $funcTablename = 'tt_products_cat'; } } @@ -691,7 +691,7 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax ); $contentTmp = $categoryView->printView( - $functablename, + $funcTablename, $templateCode, $theCode, $errorCode, @@ -841,13 +841,13 @@ public function run(&$cObj, $pibaseClass, &$errorCode, $content = '', $bRunAjax $config['recursive'] ); $tableInfoArray = ['SINGLECAT' => 'tt_products_cat', 'SINGLEDAMCAT' => 'tx_dam_cat', 'SINGLEAD' => 'address']; - $functablename = $tableInfoArray[$theCode]; - $uid = $piVars[tx_ttproducts_model_control::getPivar($functablename)]; + $funcTablename = $tableInfoArray[$theCode]; + $uid = $piVars[tx_ttproducts_model_control::getPivar($funcTablename)]; if ($uid) { $contentTmp = $catView->printView( $templateCode, - $functablename, + $funcTablename, $uid, $theCode, $errorCode, @@ -1372,11 +1372,11 @@ public function products_display( } if ($theCode == 'LISTARTICLES' && $conf['useArticles']) { - $functablename = 'tt_products_articles'; + $funcTablename = 'tt_products_articles'; } elseif ($theCode == 'LISTDAM') { - $functablename = 'tx_dam'; + $funcTablename = 'tx_dam'; } else { - $functablename = 'tt_products'; + $funcTablename = 'tt_products'; } $allowedItems = FlexformUtility::get(PluginApi::getFlexform(), 'productSelection'); @@ -1385,7 +1385,7 @@ public function products_display( $content = $listView->printView( $templateCode, $theCode, - $functablename, + $funcTablename, $allowedItems, $bAllPages, '', diff --git a/eid/class.tx_ttproducts_db.php b/eid/class.tx_ttproducts_db.php index 430ae87a6..5142efa1e 100644 --- a/eid/class.tx_ttproducts_db.php +++ b/eid/class.tx_ttproducts_db.php @@ -399,17 +399,17 @@ protected function generateResponse( $articleTcaColumns = $GLOBALS['TCA']['tt_products_articles']['columns']; - foreach ($rowArray as $functablename => $row) { // tt-products-list-1-size + foreach ($rowArray as $funcTablename => $row) { // tt-products-list-1-size if ( - !isset($tableObjArray[$functablename]) || - !is_object($tableObjArray[$functablename]) + !isset($tableObjArray[$funcTablename]) || + !is_object($tableObjArray[$funcTablename]) ) { $suffix = '-from-tt-products-articles'; } else { $suffix = ''; } - $itemTableView = $tablesObj->get($functablename, true); + $itemTableView = $tablesObj->get($funcTablename, true); $itemTable = $itemTableView->getModelObj(); $tablename = $itemTable->getTablename(); $tableconf = $itemTable->getTableConf($theCode); @@ -420,11 +420,11 @@ protected function generateResponse( $pidListObj = GeneralUtility::makeInstance('tx_ttproducts_pid_list'); $pidListObj->applyRecursive($config['recursive'], $config['pid_list'], true); - $categoryfunctablename = 'tt_products_cat'; - $categoryTableView = $tablesObj->get($categoryfunctablename, true); + $categoryFuncTablename = 'tt_products_cat'; + $categoryTableView = $tablesObj->get($categoryFuncTablename, true); $categoryTable = $categoryTableView->getModelObj(); $piVars = tx_ttproducts_model_control::getPiVars(); - $categoryPivar = tx_ttproducts_model_control::getPiVar($categoryfunctablename); + $categoryPivar = tx_ttproducts_model_control::getPiVar($categoryFuncTablename); $currentCat = $categoryTable->getParamDefault( @@ -448,7 +448,7 @@ protected function generateResponse( ); } - $jsTableNamesId = str_replace('_', '-', $functablename) . $suffix; + $jsTableNamesId = str_replace('_', '-', $funcTablename) . $suffix; $uid = $row['uid']; $errorId = tx_ttproducts_model_control::getBasketInputErrorIdPrefix() . '-' . $uid; $objResponse->addAssign($errorId, 'innerHTML', ''); @@ -504,7 +504,7 @@ protected function generateResponse( $linkWrap = false; $modifiedValue = $fieldViewObj->getRowMarkerArray( - $functablename, + $funcTablename, $field, $row, $tmp, diff --git a/lib/class.tx_ttproducts_config.php b/lib/class.tx_ttproducts_config.php index ee66ca6b9..b9533f1f6 100644 --- a/lib/class.tx_ttproducts_config.php +++ b/lib/class.tx_ttproducts_config.php @@ -103,14 +103,14 @@ public function getUseArticles() return $result; } - public function getTableDesc($functablename, $type = '') + public function getTableDesc($funcTablename, $type = '') { $tableDesc = []; if ( isset($this->conf['table.']) && - isset($this->conf['table.'][$functablename . '.']) + isset($this->conf['table.'][$funcTablename . '.']) ) { - $tableDesc = $this->conf['table.'][$functablename . '.']; + $tableDesc = $this->conf['table.'][$funcTablename . '.']; } if ($type && isset($tableDesc[$type])) { @@ -122,16 +122,16 @@ public function getTableDesc($functablename, $type = '') return $result; } - public function getTableName($functablename) + public function getTableName($funcTablename) { if ( isset($this->conf['table.']) && is_array($this->conf['table.']) && - isset($this->conf['table.'][$functablename]) + isset($this->conf['table.'][$funcTablename]) ) { - $result = $this->conf['table.'][$functablename]; + $result = $this->conf['table.'][$funcTablename]; } else { - $result = $functablename; + $result = $funcTablename; } return $result; @@ -178,16 +178,16 @@ public function getSpecialConf($type, $tablename = '', $theCode = '') return $specialConf; } - public function getTableConf($functablename, $theCode = '') + public function getTableConf($funcTablename, $theCode = '') { - $tableConf = $this->getSpecialConf('conf', $functablename, $theCode); + $tableConf = $this->getSpecialConf('conf', $funcTablename, $theCode); return $tableConf; } - public function getCSSConf($functablename, $theCode = '') + public function getCSSConf($funcTablename, $theCode = '') { - $cssConf = $this->getSpecialConf('CSS', $functablename, $theCode); + $cssConf = $this->getSpecialConf('CSS', $funcTablename, $theCode); return $cssConf; } diff --git a/lib/class.tx_ttproducts_csv.php b/lib/class.tx_ttproducts_csv.php index 3e7ac601e..54ffd5f60 100644 --- a/lib/class.tx_ttproducts_csv.php +++ b/lib/class.tx_ttproducts_csv.php @@ -44,7 +44,7 @@ class tx_ttproducts_csv implements SingletonInterface { public function create( - $functablename, + $funcTablename, $conf, $itemArray, $calculatedArray, @@ -60,7 +60,7 @@ public function create( $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); $orderObj = $tablesObj->get('sys_products_orders'); $accountObj = $tablesObj->get('sys_products_accounts'); - $itemTable = $tablesObj->get($functablename, false); + $itemTable = $tablesObj->get($funcTablename, false); $csvFilepath = trim($csvFilepath); if ($csvFilepath[strlen($csvFilepath) - 1] != '/') { diff --git a/lib/class.tx_ttproducts_email_div.php b/lib/class.tx_ttproducts_email_div.php index 83fee53d6..56b804392 100644 --- a/lib/class.tx_ttproducts_email_div.php +++ b/lib/class.tx_ttproducts_email_div.php @@ -49,7 +49,7 @@ public static function sendNotifyEmail( $cObj, $conf, $config, - $functablename, + $funcTablename, $orderNumber, $recipient, $v, @@ -107,16 +107,16 @@ public static function sendNotifyEmail( $markerArray['###PERSON_NAME###'] = $orderData['billing']['name']; $markerArray['###DELIVERY_NAME###'] = $orderData['delivery']['name']; - $feusersObj = $tablesObj->get($functablename, true); + $feusersObj = $tablesObj->get($funcTablename, true); $feusersObj->getAddressMarkerArray( - $functablename, + $funcTablename, $orderData['billing'], $markerArray, false, 'person' ); $feusersObj->getAddressMarkerArray( - $functablename, + $funcTablename, $orderData['delivery'], $markerArray, false, diff --git a/lib/class.tx_ttproducts_tables.php b/lib/class.tx_ttproducts_tables.php index 350a7757e..4bcd2d28f 100644 --- a/lib/class.tx_ttproducts_tables.php +++ b/lib/class.tx_ttproducts_tables.php @@ -84,16 +84,16 @@ public function setTableClassArray($tableClassArray): void $this->tableClassArray = $tableClassArray; } - public function getTableClass($functablename, $bView = false) + public function getTableClass($funcTablename, $bView = false) { $rc = ''; - if ($functablename) { + if ($funcTablename) { $neededExtension = ''; - if (isset($this->needExtensionArray[$functablename])) { - $neededExtension = $this->needExtensionArray[$functablename]; + if (isset($this->needExtensionArray[$funcTablename])) { + $neededExtension = $this->needExtensionArray[$funcTablename]; } if (empty($neededExtension) || ExtensionManagementUtility::isLoaded($neededExtension)) { - $rc = $this->tableClassArray[$functablename] . ($bView ? '_view' : ''); + $rc = $this->tableClassArray[$funcTablename] . ($bView ? '_view' : ''); } else { $rc = 'skip'; } @@ -103,20 +103,20 @@ public function getTableClass($functablename, $bView = false) } // set the $bView to true if you want to get the view class - public function get($functablename, $bView = false, $bInit = true) + public function get($funcTablename, $bView = false, $bInit = true) { $classNameArray = []; $tableObjArray = []; $resultInit = true; - $classNameArray['model'] = $this->getTableClass($functablename, false); + $classNameArray['model'] = $this->getTableClass($funcTablename, false); if ($bView) { - $classNameArray['view'] = $this->getTableClass($functablename, true); + $classNameArray['view'] = $this->getTableClass($funcTablename, true); } if (!$classNameArray['model'] || $bView && !$classNameArray['view']) { - debug('Error in ' . TT_PRODUCTS_EXT . '. No class found after calling function tx_ttproducts_tables::get with parameters "' . $functablename . '", ' . $bView . ' . ', 'internal error'); // keep this + debug('Error in ' . TT_PRODUCTS_EXT . '. No class found after calling function tx_ttproducts_tables::get with parameters "' . $funcTablename . '", ' . $bView . ' . ', 'internal error'); // keep this return false; } @@ -150,18 +150,18 @@ public function get($functablename, $bView = false, $bInit = true) if (isset($tableObj['model']) && is_object($tableObj['model'])) { if ($bInit && $tableObj['model']->needsInit()) { $resultInit = $tableObj['model']->init( - $functablename + $funcTablename ); } } else { if ($classNameArray['model'] == 'skip') { - if (isset($this->needExtensionArray[$functablename])) { - debug('The extension \'' . $this->needExtensionArray[$functablename] . '\' needed for table \'' . $functablename . '\' has not been installed.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this + if (isset($this->needExtensionArray[$funcTablename])) { + debug('The extension \'' . $this->needExtensionArray[$funcTablename] . '\' needed for table \'' . $funcTablename . '\' has not been installed.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this } else { - debug('Table \'' . $functablename . '\' is not configured.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this + debug('Table \'' . $funcTablename . '\' is not configured.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this } } else { - debug('Object for \'' . $functablename . '\' has not been found.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this + debug('Object for \'' . $funcTablename . '\' has not been found.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this } } @@ -187,18 +187,18 @@ public function get($functablename, $bView = false, $bInit = true) return $result; } - public function getMM($functablename) + public function getMM($funcTablename) { $tableObj = GeneralUtility::makeInstance('tx_ttproducts_mm_table'); if (isset($tableObj) && is_object($tableObj)) { - if ($tableObj->needsInit() || $tableObj->getFuncTablename() != $functablename) { + if ($tableObj->needsInit() || $tableObj->getFuncTablename() != $funcTablename) { $tableObj->init( - $functablename + $funcTablename ); } } else { - debug('Object for \'' . $functablename . '\' has not been found.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this + debug('Object for \'' . $funcTablename . '\' has not been found.', 'internal error in ' . TT_PRODUCTS_EXT); // keep this } return $tableObj; @@ -220,12 +220,12 @@ public function getMM($functablename) * * @access public */ - public function getForeignTableInfo($functablename, $fieldname) + public function getForeignTableInfo($funcTablename, $fieldname) { $rc = []; if ($fieldname != '') { - $tableObj = $this->get($functablename, false); - $tablename = $tableObj->getTableName($functablename); + $tableObj = $this->get($funcTablename, false); + $tablename = $tableObj->getTableName($funcTablename); $rc = TableUtility::getForeignTableInfo($tablename, $fieldname); } diff --git a/model/class.tx_ttproducts_account.php b/model/class.tx_ttproducts_account.php index 181e225d8..b77426b12 100644 --- a/model/class.tx_ttproducts_account.php +++ b/model/class.tx_ttproducts_account.php @@ -51,7 +51,7 @@ class tx_ttproducts_account extends tx_ttproducts_table_base public $useAsterisk = false; public $sepa = true; - public function init($functablename): bool + public function init($funcTablename): bool { $result = true; diff --git a/model/class.tx_ttproducts_address.php b/model/class.tx_ttproducts_address.php index 2abb3bee2..8f7bec876 100644 --- a/model/class.tx_ttproducts_address.php +++ b/model/class.tx_ttproducts_address.php @@ -44,14 +44,14 @@ class tx_ttproducts_address extends tx_ttproducts_category_base /** * Getting all address values into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableconf = $cnf->getTableConf($functablename); - $tabledesc = $cnf->getTableDesc($functablename); + $tableconf = $cnf->getTableConf($funcTablename); + $tabledesc = $cnf->getTableDesc($funcTablename); $tableObj = $this->getTableObj(); $tablename = $this->getTablename(); diff --git a/model/class.tx_ttproducts_article.php b/model/class.tx_ttproducts_article.php index 3d81b477a..8cc7fc238 100644 --- a/model/class.tx_ttproducts_article.php +++ b/model/class.tx_ttproducts_article.php @@ -51,9 +51,9 @@ class tx_ttproducts_article extends tx_ttproducts_article_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); @@ -139,7 +139,7 @@ public function getRequiredFieldArray($theCode = '') } else { $requiredFields = 'uid,pid,category,price,price2,directcost'; } - $instockField = $cnf->getTableDesc($functablename, 'inStock'); + $instockField = $cnf->getTableDesc($funcTablename, 'inStock'); if ($instockField && !$this->conf['alwaysInStock']) { $requiredFields = $requiredFields . ',' . $instockField; } diff --git a/model/class.tx_ttproducts_article_base.php b/model/class.tx_ttproducts_article_base.php index c9102b3f4..4e7a12e30 100644 --- a/model/class.tx_ttproducts_article_base.php +++ b/model/class.tx_ttproducts_article_base.php @@ -57,9 +57,9 @@ abstract class tx_ttproducts_article_base extends tx_ttproducts_table_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $type = $this->getType(); @@ -291,11 +291,11 @@ public function getCharRegExp($tableConf, &$replaceConf) return $result; } - public function getNeededUrlParams($functablename, $theCode) + public function getNeededUrlParams($funcTablename, $theCode) { $rc = ''; $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableconf = $cnf->getTableConf($functablename, $theCode); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); if (is_array($tableconf) && isset($tableconf['urlparams'])) { $rc = $tableconf['urlparams']; } diff --git a/model/class.tx_ttproducts_basket.php b/model/class.tx_ttproducts_basket.php index b3c525d68..36f9399c2 100644 --- a/model/class.tx_ttproducts_basket.php +++ b/model/class.tx_ttproducts_basket.php @@ -853,13 +853,13 @@ public function getQuantityArray($uidArray, &$rowArray) isset($extArray) && is_array($extArray) ) { - foreach ($rowArray as $functablename => $functableRowArray) { - $subExtArray = $extArray[$functablename]; + foreach ($rowArray as $funcTablename => $functableRowArray) { + $subExtArray = $extArray[$funcTablename]; if (isset($subExtArray) && is_array($subExtArray)) { foreach ($functableRowArray as $subRow) { $extItem = ['uid' => $subRow['uid']]; if (in_array($extItem, $subExtArray)) { - $rc[$uid][$functablename][$subRow['uid']] = $actItem['count']; + $rc[$uid][$funcTablename][$subRow['uid']] = $actItem['count']; } } } diff --git a/model/class.tx_ttproducts_card.php b/model/class.tx_ttproducts_card.php index d1a5a5a29..60c0f94d8 100644 --- a/model/class.tx_ttproducts_card.php +++ b/model/class.tx_ttproducts_card.php @@ -48,7 +48,7 @@ class tx_ttproducts_card extends tx_ttproducts_table_base public $sizeArray = ['cc_type' => 4, 'cc_number_1' => 4, 'cc_number_2' => 4, 'cc_number_3' => 4, 'cc_number_4' => 4, 'owner_name' => 0, 'cvv2' => 4, 'endtime_mm' => 2, 'endtime_yy' => 2]; public $asteriskArray = [2 => '**', 4 => '****']; - public function init($functablename): bool + public function init($funcTablename): bool { $result = true; @@ -60,7 +60,7 @@ public function init($functablename): bool $allowedUids = $basketExtra['payment.']['creditcards'] ?? ''; } - $result = parent::init($functablename); + $result = parent::init($funcTablename); $this->ccArray = $formerBasket['creditcard'] ?? []; if (isset($allowedUids)) { diff --git a/model/class.tx_ttproducts_category.php b/model/class.tx_ttproducts_category.php index eff8596dd..bda137616 100644 --- a/model/class.tx_ttproducts_category.php +++ b/model/class.tx_ttproducts_category.php @@ -52,15 +52,15 @@ class tx_ttproducts_category extends tx_ttproducts_category_base * initialization with table object and language table. */ public function init( - $functablename + $funcTablename ): bool { - $tablename = $functablename; + $tablename = $funcTablename; - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $this->tableconf = $cnf->getTableConf($functablename); + $this->tableconf = $cnf->getTableConf($funcTablename); $tableObj = $this->getTableObj(); if (isset($GLOBALS['TCA'][$tableObj->getName()]['columns']['sorting'])) { $tableObj->addDefaultFieldArray(['sorting' => 'sorting']); @@ -71,15 +71,15 @@ public function init( if (ExtensionManagementUtility::isLoaded('mbi_products_categories')) { $extensionInfo = ExtensionUtility::getExtensionInfo('mbi_products_categories'); if (version_compare($extensionInfo['version'], '0.5.0', '>=')) { - $tableDesc = $cnf->getTableDesc($functablename); + $tableDesc = $cnf->getTableDesc($funcTablename); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $functablenameArray = GeneralUtility::trimExplode(',', $tableDesc['leafFuncTables']); - $prodfunctablename = $functablenameArray[0]; - if (!$prodfunctablename) { - $prodfunctablename = 'tt_products'; + $funcTablenameArray = GeneralUtility::trimExplode(',', $tableDesc['leafFuncTables']); + $prodFuncTablename = $funcTablenameArray[0]; + if (!$prodFuncTablename) { + $prodFuncTablename = 'tt_products'; } - $prodOb = $tablesObj->get($prodfunctablename, false); - $prodTableDesc = $cnf->getTableDesc($prodfunctablename); + $prodOb = $tablesObj->get($prodFuncTablename, false); + $prodTableDesc = $cnf->getTableDesc($prodFuncTablename); $prodtablename = $prodOb->getTablename(); $categoryField = ($prodTableDesc['category'] ?: 'category'); $rcArray = TableUtility::getForeignTableInfo($prodtablename, $categoryField); @@ -87,15 +87,15 @@ public function init( } } - if ($functablename == 'tt_products_cat') { + if ($funcTablename == 'tt_products_cat') { $parentField = 'parent_category'; - } elseif ($functablename == 'tx_dam_cat') { + } elseif ($funcTablename == 'tx_dam_cat') { $parentField = 'parent_id'; } if (ExtensionManagementUtility::isLoaded('mbi_products_categories')) { $this->parentField = $parentField; - if ($functablename == 'tt_products_cat') { + if ($funcTablename == 'tt_products_cat') { $this->referenceField = 'reference_category'; } } @@ -104,7 +104,7 @@ public function init( // (!$this->catconf['language.'] || // !$this->catconf['language.']['type'])) { - if ($this->bUseLanguageTable($this->tableconf) && ($functablename == 'tt_products_cat')) { + if ($this->bUseLanguageTable($this->tableconf) && ($funcTablename == 'tt_products_cat')) { $this->getTableObj()->setLanguage($this->config['LLkey']); $langTable = 'tt_products_cat_language'; // TODO: DAM alternative language $tableObj->setLangName($langTable); @@ -125,10 +125,10 @@ public function init( public function getRootCat() { - $functablename = $this->getFuncTablename(); - if ($functablename == 'tt_products_cat') { + $funcTablename = $this->getFuncTablename(); + if ($funcTablename == 'tt_products_cat') { $result = $this->conf['rootCategoryID'] ?? ''; - } elseif ($functablename == 'tx_dam_cat') { + } elseif ($funcTablename == 'tx_dam_cat') { $result = $this->conf['rootDAMCategoryID'] ?? ''; } diff --git a/model/class.tx_ttproducts_category_base.php b/model/class.tx_ttproducts_category_base.php index 076ad16cd..00f65cf72 100644 --- a/model/class.tx_ttproducts_category_base.php +++ b/model/class.tx_ttproducts_category_base.php @@ -139,10 +139,10 @@ public function getCategoryArray($productRow, $orderBy = '') if ($this->getMMTablename()) { $hookVar = ''; - $functablename = $this->getFuncTablename(); - if ($functablename == 'tt_products_cat') { + $funcTablename = $this->getFuncTablename(); + if ($funcTablename == 'tt_products_cat') { $hookVar = 'prodCategory'; - } elseif ($functablename == 'tx_dam_cat') { + } elseif ($funcTablename == 'tx_dam_cat') { $hookVar = 'DAMCategory'; } // Call all addWhere hooks for categories at the end of this method @@ -177,8 +177,8 @@ public function getCategoryArray($productRow, $orderBy = '') public function getDepth($theCode) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $functablename = $this->getFuncTablename(); - $tableconf = $cnf->getTableConf($functablename, $theCode); + $funcTablename = $this->getFuncTablename(); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); $result = $tableconf['hierarchytiers']; if (!isset($result)) { $result = 1; @@ -191,10 +191,10 @@ public function getLineArray($start, $endArray) { $catArray = []; $hookVar = ''; - $functablename = $this->getFuncTablename(); - if ($functablename == 'tt_products_cat') { + $funcTablename = $this->getFuncTablename(); + if ($funcTablename == 'tt_products_cat') { $hookVar = 'prodCategory'; - } elseif ($functablename == 'tx_dam_cat') { + } elseif ($funcTablename == 'tx_dam_cat') { $hookVar = 'DAMCategory'; } diff --git a/model/class.tx_ttproducts_content.php b/model/class.tx_ttproducts_content.php index d67aedaea..f18289bd8 100644 --- a/model/class.tx_ttproducts_content.php +++ b/model/class.tx_ttproducts_content.php @@ -48,9 +48,9 @@ class tx_ttproducts_content extends tx_ttproducts_table_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); $this->getTableObj()->setDefaultFieldArray(['uid' => 'uid', 'pid' => 'pid', 't3ver_oid' => 't3ver_oid', 'tstamp' => 'tstamp', 'sorting' => 'sorting', 'deleted' => 'deleted', 'hidden' => 'hidden', 'starttime' => 'starttime', 'endtime' => 'endtime', 'fe_group' => 'fe_group']); diff --git a/model/class.tx_ttproducts_country.php b/model/class.tx_ttproducts_country.php index 3aab67fb2..8696306e3 100644 --- a/model/class.tx_ttproducts_country.php +++ b/model/class.tx_ttproducts_country.php @@ -48,9 +48,9 @@ class tx_ttproducts_country extends tx_ttproducts_table_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $tablename = $this->getTablename(); diff --git a/model/class.tx_ttproducts_dam.php b/model/class.tx_ttproducts_dam.php index bf877ae85..9bbd3f40f 100644 --- a/model/class.tx_ttproducts_dam.php +++ b/model/class.tx_ttproducts_dam.php @@ -55,9 +55,9 @@ class tx_ttproducts_dam extends tx_ttproducts_article_base /** * DAM elements. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $this->tableArray = $tableArray; @@ -65,7 +65,7 @@ public function init($functablename): bool $tableObj->addDefaultFieldArray(['sorting' => 'sorting']); $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tablename = $cnf->getTableName($functablename); + $tablename = $cnf->getTableName($funcTablename); $tableObj->setTCAFieldArray($tablename, 'dam'); } diff --git a/model/class.tx_ttproducts_email.php b/model/class.tx_ttproducts_email.php index d7c1c4ac0..2c9afe6c2 100644 --- a/model/class.tx_ttproducts_email.php +++ b/model/class.tx_ttproducts_email.php @@ -47,9 +47,9 @@ class tx_ttproducts_email extends tx_ttproducts_table_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $tableObj = $this->getTableObj(); diff --git a/model/class.tx_ttproducts_graduated_price.php b/model/class.tx_ttproducts_graduated_price.php index 04764d38f..aec207adf 100644 --- a/model/class.tx_ttproducts_graduated_price.php +++ b/model/class.tx_ttproducts_graduated_price.php @@ -45,7 +45,7 @@ class tx_ttproducts_graduated_price protected $bHasBeenInitialised = false; public $mmArray = []; public $dataArray = []; // array of read in products - public $functablename = 'tt_products_graduated_price'; + public $funcTablename = 'tt_products_graduated_price'; public $mm_table = ''; // mm table protected $parentObject = false; protected $foreignConfig = []; @@ -62,7 +62,7 @@ public function getParent() public function getTablename() { - return $this->functablename; + return $this->funcTablename; } public function getMMTablename() @@ -97,7 +97,7 @@ public function init($parentObject, $fieldname) if ($foreignConfig) { $this->foreignConfig = $foreignConfig; - $this->functablename = $foreignConfig['foreign_table']; + $this->funcTablename = $foreignConfig['foreign_table']; $this->mm_table = $foreignConfig['mmtable']; $result = true; } diff --git a/model/class.tx_ttproducts_model_control.php b/model/class.tx_ttproducts_model_control.php index 327a47579..128b75095 100644 --- a/model/class.tx_ttproducts_model_control.php +++ b/model/class.tx_ttproducts_model_control.php @@ -151,10 +151,10 @@ public static function getPiVars() return $result; } - public static function getPiVar($functablename) + public static function getPiVar($funcTablename) { $paramsTableArray = self::getParamsTableArray(); - $result = array_search($functablename, $paramsTableArray); + $result = array_search($funcTablename, $paramsTableArray); return $result; } @@ -179,10 +179,10 @@ public static function getAndVar($k) return $result; } - public static function getPiVarValue($functablename) + public static function getPiVarValue($funcTablename) { $piVars = self::getPiVars(); - $piVar = self::getPiVar($functablename); + $piVar = self::getPiVar($funcTablename); $result = false; if ( @@ -425,7 +425,7 @@ public static function getWhereByFields( public static function getSearchInfo( $cObj, array $searchVars, - $functablename, + $funcTablename, $tablename, &$searchboxWhere, &$bUseSearchboxArray, @@ -506,7 +506,7 @@ public static function getSearchInfo( $searchFieldArray['local'] = $tmpArray[1]; $searchFieldArray['foreign'] = ''; - if (self::getPiVar($functablename) == $searchParamArray['local']) { + if (self::getPiVar($funcTablename) == $searchParamArray['local']) { $sqlTableArray['from'] = []; $sqlTableArray['join'] = []; $sqlTableArray['local'] = []; diff --git a/model/class.tx_ttproducts_orderaddress.php b/model/class.tx_ttproducts_orderaddress.php index 8a0e30e6d..bb1cf51c7 100644 --- a/model/class.tx_ttproducts_orderaddress.php +++ b/model/class.tx_ttproducts_orderaddress.php @@ -53,14 +53,14 @@ class tx_ttproducts_orderaddress extends tx_ttproducts_table_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $this->tableconf = $cnf->getTableConf($functablename); + $this->tableconf = $cnf->getTableConf($funcTablename); $tablename = $this->getTablename(); // // image diff --git a/model/class.tx_ttproducts_product.php b/model/class.tx_ttproducts_product.php index 2a133a41d..f9d4cccb9 100644 --- a/model/class.tx_ttproducts_product.php +++ b/model/class.tx_ttproducts_product.php @@ -67,9 +67,9 @@ class tx_ttproducts_product extends tx_ttproducts_article_base * Getting all tt_products_cat categories into internal array. */ public function init( - $functablename = 'tt_products' + $funcTablename = 'tt_products' ): bool { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if ($result) { $cnfObj = GeneralUtility::makeInstance('tx_ttproducts_config'); @@ -929,8 +929,8 @@ public function getTotalDiscount( ['1', '2'] ) ) { - $categoryfunctablename = 'tt_products_cat'; - $categoryTable = $tablesObj->get($categoryfunctablename, false); + $categoryFuncTablename = 'tt_products_cat'; + $categoryTable = $tablesObj->get($categoryFuncTablename, false); $discount = 0; switch ($conf['discountFieldMode']) { diff --git a/model/class.tx_ttproducts_static_tax.php b/model/class.tx_ttproducts_static_tax.php index e3ed52e8e..877bd0926 100644 --- a/model/class.tx_ttproducts_static_tax.php +++ b/model/class.tx_ttproducts_static_tax.php @@ -59,12 +59,12 @@ class tx_ttproducts_static_tax extends tx_ttproducts_table_base /** * Getting all tt_products_cat categories into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { $result = false; if (self::isInstalled()) { - $result = parent::init($functablename); + $result = parent::init($funcTablename); if (!$result) { return false; } diff --git a/model/class.tx_ttproducts_table_base.php b/model/class.tx_ttproducts_table_base.php index 1625b871d..71920d912 100644 --- a/model/class.tx_ttproducts_table_base.php +++ b/model/class.tx_ttproducts_table_base.php @@ -58,7 +58,7 @@ abstract class tx_ttproducts_table_base implements SingletonInterface protected $dataArray; protected $labelfieldname = 'title'; protected $enable = false; - private $functablename; + private $funcTablename; private $tablename; private $tableConf; private $tableDesc; @@ -93,7 +93,7 @@ abstract class tx_ttproducts_table_base implements SingletonInterface 'usebydate' => 'tx_ttproducts_field_datetime', ]; - public function init($functablename): bool + public function init($funcTablename): bool { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); $this->config = $cnf->getConfig(); @@ -102,13 +102,13 @@ public function init($functablename): bool $this->tableObj = GeneralUtility::makeInstance('tx_table_db'); $this->insertKey = 0; - $this->setFuncTablename($functablename); - $tablename = $cnf->getTableName($functablename); - $tablename = ($tablename ?: $functablename); + $this->setFuncTablename($funcTablename); + $tablename = $cnf->getTableName($funcTablename); + $tablename = ($tablename ?: $funcTablename); if (!isset($GLOBALS['TCA'][$tablename])) { debug($tablename, 'Table not found in $GLOBALS[\'TCA\']: ' . $tablename . ' in file class.tx_ttproducts_table_base.php'); // keep this - $errorText = 'ERROR in the setup of "tt_products.table.' . $functablename . '": wrong table name "' . $tablename . '".'; + $errorText = 'ERROR in the setup of "tt_products.table.' . $funcTablename . '": wrong table name "' . $tablename . '".'; $lastUnderscore = strrpos($tablename, '_'); $extName = substr($tablename, 0, $lastUnderscore); if (strpos($extName, 'tx') === 0) { @@ -120,7 +120,7 @@ public function init($functablename): bool } $this->setTablename($tablename); - $this->tableDesc = $cnf->getTableDesc($functablename); + $this->tableDesc = $cnf->getTableDesc($funcTablename); $checkDefaultFieldArray = [ @@ -451,12 +451,12 @@ public function getAlias() public function getFuncTablename() { - return $this->functablename; + return $this->funcTablename; } private function setFuncTablename($tablename): void { - $this->functablename = $tablename; + $this->funcTablename = $tablename; } public function getTablename() diff --git a/model/class.tx_ttproducts_text.php b/model/class.tx_ttproducts_text.php index 102ca7c18..9aafae17e 100644 --- a/model/class.tx_ttproducts_text.php +++ b/model/class.tx_ttproducts_text.php @@ -48,9 +48,9 @@ public function getChildUidArray( $parenttable = 'tt_products' ) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $functablename = $this->getFuncTablename(); + $funcTablename = $this->getFuncTablename(); $fallback = false; - $tableConf = $cnf->getTableConf($functablename, $theCode); + $tableConf = $cnf->getTableConf($funcTablename, $theCode); $fallback = $cnf->getFallback($tableConf); $resultArray = []; diff --git a/model/class.tx_ttproducts_voucher.php b/model/class.tx_ttproducts_voucher.php index f0b990c36..bd4a21805 100644 --- a/model/class.tx_ttproducts_voucher.php +++ b/model/class.tx_ttproducts_voucher.php @@ -53,11 +53,11 @@ class tx_ttproducts_voucher extends tx_ttproducts_table_base /** * Getting all voucher codes into internal array. */ - public function init($functablename): bool + public function init($funcTablename): bool { $result = false; if (ExtensionManagementUtility::isLoaded('voucher')) { - $result = parent::init($functablename); + $result = parent::init($funcTablename); } if ($result) { diff --git a/model/field/class.tx_ttproducts_field_media.php b/model/field/class.tx_ttproducts_field_media.php index 1f816d8ee..f0d18c018 100644 --- a/model/field/class.tx_ttproducts_field_media.php +++ b/model/field/class.tx_ttproducts_field_media.php @@ -175,12 +175,12 @@ public function getFileArray( } public function getMediaNum( - $functablename, + $funcTablename, $fieldname, $theCode ) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableConf = $cnf->getTableConf($functablename, $theCode); + $tableConf = $cnf->getTableConf($funcTablename, $theCode); $mediaNum = $tableConf['limitImage'] ?? ''; if (!$mediaNum) { diff --git a/view/class.tx_ttproducts_article_base_view.php b/view/class.tx_ttproducts_article_base_view.php index b0df54eeb..b95ee9ae6 100644 --- a/view/class.tx_ttproducts_article_base_view.php +++ b/view/class.tx_ttproducts_article_base_view.php @@ -106,7 +106,7 @@ public function getVariant() public function getItemMarkerSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, &$markerArray, &$subpartArray, @@ -121,7 +121,7 @@ public function getItemMarkerSubpartArrays( ): void { $this->getItemSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, $subpartArray, $wrappedSubpartArray, @@ -135,7 +135,7 @@ public function getItemMarkerSubpartArrays( public function getItemSubpartArrays( &$templateCode, - $functablename, + $funcTablename, $row, &$subpartArray, &$wrappedSubpartArray, @@ -148,7 +148,7 @@ public function getItemSubpartArrays( ): void { parent::getItemSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, $subpartArray, $wrappedSubpartArray, @@ -218,14 +218,14 @@ public function getPriceMarkerArray( ): void { $modelObj = $this->getModelObj(); $priceViewObj = GeneralUtility::makeInstance('tx_ttproducts_field_price_view'); - $functablename = $modelObj->getFuncTablename(); + $funcTablename = $modelObj->getFuncTablename(); $mainId = $this->getId($row, $id, $theCode); - foreach ($GLOBALS['TCA'][$functablename]['columns'] as $field => $fieldTCA) { + foreach ($GLOBALS['TCA'][$funcTablename]['columns'] as $field => $fieldTCA) { if (strpos($field, 'price') === 0) { $priceViewObj->getModelMarkerArray( - $functablename, + $funcTablename, $basketExtra, $basketRecs, $field, diff --git a/view/class.tx_ttproducts_basketitem_view.php b/view/class.tx_ttproducts_basketitem_view.php index cd9df66ad..32dcd3a70 100644 --- a/view/class.tx_ttproducts_basketitem_view.php +++ b/view/class.tx_ttproducts_basketitem_view.php @@ -46,7 +46,7 @@ class tx_ttproducts_basketitem_view implements SingletonInterface { public function getQuantityName( $uid, - $functablename, + $funcTablename, $externalRow, $parentFuncTablename, $parentRow, @@ -57,7 +57,7 @@ public function getQuantityName( $externalQuantity = ''; if ( - $functablename != 'tt_products' && + $funcTablename != 'tt_products' && is_array($externalRow) && isset($externalRow['uid']) ) { @@ -73,7 +73,7 @@ public function getQuantityName( } } - $piVar = tx_ttproducts_model_control::getPiVar($functablename); + $piVar = tx_ttproducts_model_control::getPiVar($funcTablename); if ($piVar !== false) { $externalQuantity = '[' . $externalQuantity . $piVar . '=' . intval($externalRow['uid']) . ']'; @@ -92,7 +92,7 @@ public function getQuantityName( public function getItemMarkerSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, $theCode, $tagArray, @@ -191,7 +191,7 @@ public function getItemMarkerSubpartArrays( * @access private */ public function getItemMarkerArray( - $functablename, + $funcTablename, $useCache, $item, &$markerArray, @@ -240,7 +240,7 @@ public function getItemMarkerArray( $theCode == 'SINGLE' && empty($presetVariantArray) && $bSelect && - $functablename == 'tt_products' + $funcTablename == 'tt_products' ) { $articleNo = tx_ttproducts_control_product::getActiveArticleNo(); @@ -306,7 +306,7 @@ public function getItemMarkerArray( $basketQuantityName = $this->getQuantityName( $row['uid'], - $functablename, + $funcTablename, $externalRow, $parentFuncTablename, $parentRow, @@ -556,7 +556,7 @@ public function getItemMarkerArray( $damParam = tx_ttproducts_model_control::getPiVarValue('tx_dam'); if ( - $functablename == 'tt_products' && + $funcTablename == 'tt_products' && is_array($extArray) && isset($extArray['tx_dam']) ) { diff --git a/view/class.tx_ttproducts_cat_view.php b/view/class.tx_ttproducts_cat_view.php index 004ccdfdb..8a1e739de 100644 --- a/view/class.tx_ttproducts_cat_view.php +++ b/view/class.tx_ttproducts_cat_view.php @@ -76,7 +76,7 @@ public function init( // returns the single view public function printView( $templateCode, - $functablename, + $funcTablename, $uid, $theCode, &$error_code, @@ -84,7 +84,7 @@ public function printView( ) { $templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $tableViewObj = $tablesObj->get($functablename, true); + $tableViewObj = $tablesObj->get($funcTablename, true); $tableObj = $tableViewObj->getModelObj(); $markerObj = GeneralUtility::makeInstance('tx_ttproducts_marker'); $subpartmarkerObj = GeneralUtility::makeInstance('tx_ttproducts_subpartmarker'); @@ -96,11 +96,11 @@ public function printView( if ($this->config['displayCurrentRecord']) { $row = $this->cObj->data; } elseif ($uid) { - $pidField = ($functablename == 'pages' ? 'uid' : 'pid'); + $pidField = ($funcTablename == 'pages' ? 'uid' : 'pid'); $where = $pidField . ' IN (' . $this->pidListObj->getPidlist() . ')'; $row = $tableObj->get($uid, 0, true, $where); $row = $tableObj->get($uid, 0, true, $where); - $tableConf = $cnf->getTableConf($functablename, $theCode); + $tableConf = $cnf->getTableConf($funcTablename, $theCode); $tableObj->clear(); $tableObj->initCodeConf($theCode, $tableConf); $tableLangFields = $cnf->getTranslationFields($tableConf); @@ -227,7 +227,7 @@ public function printView( 'listcatImage', $viewParentCatTagArray, [], - $functablename == 'pages', + $funcTablename == 'pages', $theCode, tx_ttproducts_control_basket::getBasketExtra(), tx_ttproducts_control_basket::getRecs(), @@ -408,7 +408,7 @@ public function printView( ); } else { $error_code[0] = 'wrong_parameter'; - $error_code[1] = (($functablename == 'pages') ? 'page' : 'cat'); + $error_code[1] = (($funcTablename == 'pages') ? 'page' : 'cat'); $error_code[2] = intval($uid); $error_code[3] = $this->pidListObj->getPidlist(); } diff --git a/view/class.tx_ttproducts_category_view.php b/view/class.tx_ttproducts_category_view.php index 003f617b7..74eb1e31a 100644 --- a/view/class.tx_ttproducts_category_view.php +++ b/view/class.tx_ttproducts_category_view.php @@ -77,13 +77,13 @@ public function getMarkerArray( $modelObj = $this->getModelObj(); $row = ($category ? $modelObj->get($category) : ['title' => '', 'pid' => $pid]); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $functablename = $modelObj->getFuncTablename(); + $funcTablename = $modelObj->getFuncTablename(); // $imageObj = GeneralUtility::makeInstance('tx_ttproducts_field_image_view'); // // // Get image // $imageObj->getRowMarkerArrayEnhanced( - // $functablename, + // $funcTablename, // $row, // $this->marker, // $markerArray, @@ -111,7 +111,7 @@ public function getMarkerArray( } $this->setMarkerArrayCatTitle($markerArray, $catTitle, $prefix); parent::getRowMarkerArray( - $functablename, + $funcTablename, $row, $markerKey, $markerArray, diff --git a/view/class.tx_ttproducts_catlist_view.php b/view/class.tx_ttproducts_catlist_view.php index ba6db11f4..4f3e3bb70 100644 --- a/view/class.tx_ttproducts_catlist_view.php +++ b/view/class.tx_ttproducts_catlist_view.php @@ -44,7 +44,7 @@ class tx_ttproducts_catlist_view extends tx_ttproducts_catlist_view_base public function getChildsContent( $theCode, $t, - $functablename, + $funcTablename, $categoryArray, array $catArray, array $childArray, @@ -99,7 +99,7 @@ public function getChildsContent( } } $this->getMarkerArray( - $functablename, + $funcTablename, $markerArray, $linkOutArray, $depth + 1, @@ -125,7 +125,7 @@ public function getChildsContent( $this->renderChilds( $theCode, $t, - $functablename, + $funcTablename, $categoryArray, $catArray, $grandChildArray, @@ -179,7 +179,7 @@ public function getChildsContent( protected function renderChilds( $theCode, $t, - $functablename, + $funcTablename, $categoryArray, $catArray, $childArray, @@ -199,7 +199,7 @@ protected function renderChilds( $this->getChildsContent( $theCode, $t, - $functablename, + $funcTablename, $categoryArray, $catArray, $childArray, @@ -220,7 +220,7 @@ protected function renderChilds( // returns the category list view public function printView( - $functablename, + $funcTablename, &$templateCode, $theCode, &$error_code, @@ -235,7 +235,7 @@ public function printView( $t = []; $ctrlArray = []; parent::getPrintViewArrays( - $functablename, + $funcTablename, $templateCode, $t, $htmlParts, @@ -261,7 +261,7 @@ public function printView( $markerObj = GeneralUtility::makeInstance('tx_ttproducts_marker'); $subpartmarkerObj = GeneralUtility::makeInstance('tx_ttproducts_subpartmarker'); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $catView = $tablesObj->get($functablename, true); + $catView = $tablesObj->get($funcTablename, true); $catTableObj = $catView->getModelObj(); if (!empty($error_code)) { @@ -319,7 +319,7 @@ public function printView( $markerArray = []; $iCount++; $this->getMarkerArray( - $functablename, + $funcTablename, $markerArray, $linkOutArray, 1, @@ -343,7 +343,7 @@ public function printView( $this->renderChilds( $theCode, $t, - $functablename, + $funcTablename, $categoryArray, $catArray, $childArray, @@ -368,7 +368,7 @@ public function printView( $wrappedSubpartArray = []; $catView->getItemSubpartArrays( $t['listFrameWork'], - $functablename, + $funcTablename, $row, $subpartArray, $wrappedSubpartArray, @@ -390,7 +390,7 @@ public function printView( $this->getItemSubpartArrays( $t['categoryFrameWork'], - $functablename, + $funcTablename, $row, $subpartArray, $wrappedSubpartArray, @@ -475,7 +475,7 @@ public function printView( public function getItemSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, &$subpartArray, &$wrappedSubpartArray, @@ -486,11 +486,11 @@ public function getItemSubpartArrays( $id ): void { $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $categoryTableView = $tablesObj->get($functablename, true); + $categoryTableView = $tablesObj->get($funcTablename, true); $categoryTableView->getItemSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, $subpartArray, $wrappedSubpartArray, @@ -507,7 +507,7 @@ public function getItemSubpartArrays( * Fills in the markerArray with data for a category. */ public function getMarkerArray( - $functablename, + $funcTablename, &$markerArray, &$linkOutArray, $depth, @@ -532,12 +532,12 @@ public function getMarkerArray( $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); $pageObj = $tablesObj->get('pages'); - $categoryTableView = $tablesObj->get($functablename, true); + $categoryTableView = $tablesObj->get($funcTablename, true); $categoryTable = $categoryTableView->getModelObj(); $cssConf = $cnfObj->getCSSConf( - $functablename, + $funcTablename, $theCode ); diff --git a/view/class.tx_ttproducts_catlist_view_base.php b/view/class.tx_ttproducts_catlist_view_base.php index d8a6ccaa0..30773512a 100644 --- a/view/class.tx_ttproducts_catlist_view_base.php +++ b/view/class.tx_ttproducts_catlist_view_base.php @@ -324,7 +324,7 @@ public function getBrowserMarkerArray( // returns the category view arrays protected function getPrintViewArrays( - $functablename, + $funcTablename, &$templateCode, &$t, &$htmlParts, @@ -369,7 +369,7 @@ protected function getPrintViewArrays( $ctrlArray['bUseBrowser'] = false; $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $functableArray = [$functablename]; + $functableArray = [$funcTablename]; $tableConfArray = []; $viewConfArray = []; $searchVars = $piVars[tx_ttproducts_model_control::getSearchboxVar()] ?? ''; @@ -381,12 +381,12 @@ protected function getPrintViewArrays( $viewConfArray ); - $categoryTable = $tablesObj->get($functablename, 0); + $categoryTable = $tablesObj->get($funcTablename, 0); $tablename = $categoryTable->getTablename(); $aliasPostfix = ''; $alias = $categoryTable->getAlias() . $aliasPostfix; $categoryTable->clear(); - $tableConf = $tableConfArray[$functablename]; + $tableConf = $tableConfArray[$funcTablename]; $categoryTable->initCodeConf($theCode, $tableConf); $this->setTableConfArray($tableConfArray); $this->setViewConfArray($viewConfArray); @@ -400,7 +400,7 @@ protected function getPrintViewArrays( tx_ttproducts_model_control::getSearchInfo( $this->cObj, $searchVars, - $functablename, + $funcTablename, $tablename, $searchboxWhere, $bUseSearchboxArray, @@ -445,14 +445,14 @@ protected function getPrintViewArrays( $tmp = $templateService->substituteMarkerArrayCached($t['categoryFrameWork'], [], $subpartArray); $htmlParts = GeneralUtility::trimExplode('###CATEGORY_TMP###', $tmp); $rootCat = $categoryTable->getRootCat() ?? ''; - $currentCat = $categoryTable->getParamDefault($theCode, $piVars[tx_ttproducts_model_control::getPiVar($functablename)] ?? ''); + $currentCat = $categoryTable->getParamDefault($theCode, $piVars[tx_ttproducts_model_control::getPiVar($funcTablename)] ?? ''); $startCat = $currentCat; if (strpos($theCode, 'SELECT') !== false) { $startCat = 0; } - if ($pageAsCategory && $functablename == 'pages') { + if ($pageAsCategory && $funcTablename == 'pages') { $excludeCat = $pibaseObj->getContentObjectRenderer()->data['pages']; if (!$rootCat) { @@ -644,8 +644,8 @@ protected function getPrintViewArrays( ) { $excludeCat = $tableConf['special.']['no']; } - } // if ($pageAsCategory && $functablename == 'pages') - if ($functablename == 'pages') { + } // if ($pageAsCategory && $funcTablename == 'pages') + if ($funcTablename == 'pages') { $allowedCats = $this->pidListObj->getPidlist($rootCat); } @@ -701,7 +701,7 @@ protected function getPrintViewArrays( } elseif (!is_object($categoryTable)) { $error_code[0] = 'internal_error'; $error_code[1] = 'TTP_1'; - $error_code[2] = $functablename; + $error_code[2] = $funcTablename; $rc = false; } diff --git a/view/class.tx_ttproducts_control_view.php b/view/class.tx_ttproducts_control_view.php index 1fbc47e57..157e65a23 100644 --- a/view/class.tx_ttproducts_control_view.php +++ b/view/class.tx_ttproducts_control_view.php @@ -60,7 +60,7 @@ public function getMarkerArray(&$markerArray, &$allMarkers, $tableConfArray): vo $controlArray = tx_ttproducts_model_control::getControlArray(); $separator = ';'; - foreach ($tableConfArray as $functablename => $tableConf) { + foreach ($tableConfArray as $funcTablename => $tableConf) { if (isset($tableConf['view.']) && is_array($tableConf['view.'])) { foreach ($tableConf['view.'] as $type => $typeConf) { if (is_array($typeConf)) { diff --git a/view/class.tx_ttproducts_download_view.php b/view/class.tx_ttproducts_download_view.php index 4eb2cb07c..cab0a3e4b 100644 --- a/view/class.tx_ttproducts_download_view.php +++ b/view/class.tx_ttproducts_download_view.php @@ -85,8 +85,8 @@ public function getDownloadMarkerSubpartArrays( $cObj->start([]); $templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $functablename = 'tt_products'; - $itemTableView = $tablesObj->get($functablename, true); + $funcTablename = 'tt_products'; + $itemTableView = $tablesObj->get($funcTablename, true); $itemTable = $itemTableView->getModelObj(); $orderObj = $tablesObj->get('sys_products_orders'); $variantSeparator = $itemTable->getVariant()->getSplitSeparator(); diff --git a/view/class.tx_ttproducts_edit_variant_dummy_view.php b/view/class.tx_ttproducts_edit_variant_dummy_view.php index 00644324a..6cd983422 100644 --- a/view/class.tx_ttproducts_edit_variant_dummy_view.php +++ b/view/class.tx_ttproducts_edit_variant_dummy_view.php @@ -47,7 +47,7 @@ public function init($modelObj): void public function getSubpartMarkerArray( $templateCode, - $functablename, + $funcTablename, $row, $theCode, $bEditable, diff --git a/view/class.tx_ttproducts_edit_variant_view.php b/view/class.tx_ttproducts_edit_variant_view.php index 90ba0a32b..ba36a79f2 100644 --- a/view/class.tx_ttproducts_edit_variant_view.php +++ b/view/class.tx_ttproducts_edit_variant_view.php @@ -58,14 +58,14 @@ public function getModelObj() public function getMarkerArray( $bEditable, $row, - $functablename, + $funcTablename, $theCode, $config, &$markerArray ): void { if (isset($config) && is_array($config)) { $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $itemTableView = $tablesObj->get($functablename, true); + $itemTableView = $tablesObj->get($funcTablename, true); $uid = $row['uid']; $mainAttributes = ''; @@ -93,7 +93,7 @@ public function getMarkerArray( } } - $ajaxFunction = tx_ttproducts_control_basket::getAjaxVariantFunction($row, $functablename, $theCode); + $ajaxFunction = tx_ttproducts_control_basket::getAjaxVariantFunction($row, $funcTablename, $theCode); $splitArray = preg_split('/ *= */', $mainAttributes); $mainAttributesArray = []; @@ -147,7 +147,7 @@ public function getMarkerArray( public function getSubpartMarkerArray( $templateCode, - $functablename, + $funcTablename, $row, $theCode, $bEditable, @@ -177,7 +177,7 @@ public function getSubpartMarkerArray( $this->getMarkerArray( $bEditable, $row, - $functablename, + $funcTablename, $theCode, $config, $markerArray diff --git a/view/class.tx_ttproducts_fal_view.php b/view/class.tx_ttproducts_fal_view.php index 664fc4d84..e5f39d366 100644 --- a/view/class.tx_ttproducts_fal_view.php +++ b/view/class.tx_ttproducts_fal_view.php @@ -51,7 +51,7 @@ class tx_ttproducts_fal_view extends tx_ttproducts_article_base_view public function getItemSubpartArrays( &$templateCode, - $functablename, + $funcTablename, $row, &$subpartArray, &$wrappedSubpartArray, @@ -63,7 +63,7 @@ public function getItemSubpartArrays( ): void { parent::getItemSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, $subpartArray, $wrappedSubpartArray, diff --git a/view/class.tx_ttproducts_list_view.php b/view/class.tx_ttproducts_list_view.php index e8b492dd0..f6526281f 100644 --- a/view/class.tx_ttproducts_list_view.php +++ b/view/class.tx_ttproducts_list_view.php @@ -426,7 +426,7 @@ public function getBrowserMarkers( public function printView( $templateCode, $theCode, - $functablename, + $funcTablename, $allowedItems, $additionalPages, $hiddenFields, @@ -588,31 +588,31 @@ public function printView( $formName = $formNameArray[$theCode]; } - $itemTableView = $tablesObj->get($functablename, true); + $itemTableView = $tablesObj->get($funcTablename, true); $itemTable = $itemTableView->getModelObj(); $tablename = $itemTable->getTablename(); - $categoryfunctablename = ''; + $categoryFuncTablename = ''; if ($itemTable->getType() == 'dam') { - $categoryfunctablename = 'tx_dam_cat'; + $categoryFuncTablename = 'tx_dam_cat'; } else { - if ($functablename == 'tt_products') { + if ($funcTablename == 'tt_products') { if (!$pageAsCategory || $pageAsCategory == 1) { - $categoryfunctablename = 'tt_products_cat'; + $categoryFuncTablename = 'tt_products_cat'; } else { - $categoryfunctablename = 'pages'; + $categoryFuncTablename = 'pages'; } } } $useCategories = true; - if ($categoryfunctablename == '') { - $categoryfunctablename = 'tt_products_cat'; + if ($categoryFuncTablename == '') { + $categoryFuncTablename = 'tt_products_cat'; $useCategories = false; } $keyFieldArray = $itemTable->getKeyFieldArray($theCode); $tableConfArray = []; $viewConfArray = []; - $functableArray = [$functablename, $categoryfunctablename]; + $functableArray = [$funcTablename, $categoryFuncTablename]; tx_ttproducts_model_control::getTableConfArrays( $cObj, $functableArray, @@ -621,7 +621,7 @@ public function printView( $viewConfArray ); - $itemTable->initCodeConf($theCode, $tableConfArray[$functablename]); + $itemTable->initCodeConf($theCode, $tableConfArray[$funcTablename]); $prodAlias = $itemTable->getTableObj()->getAlias(); $tableAliasArray[$tablename] = $itemTable->getAlias(); $itemTableArray[$itemTable->getType()] = $itemTable; @@ -675,19 +675,19 @@ public function printView( } $cssConf = $cnfObj->getCSSConf($itemTable->getFuncTablename(), $theCode); - $categoryPivar = tx_ttproducts_model_control::getPiVar($categoryfunctablename); + $categoryPivar = tx_ttproducts_model_control::getPiVar($categoryFuncTablename); if ($useCategories) { - $categoryTableView = $tablesObj->get($categoryfunctablename, true); + $categoryTableView = $tablesObj->get($categoryFuncTablename, true); $categoryTable = $categoryTableView->getModelObj(); - $tableConfArray[$categoryfunctablename] = $categoryTable->getTableConf($theCode); + $tableConfArray[$categoryFuncTablename] = $categoryTable->getTableConf($theCode); $catTableConf = $categoryTable->getTableConf($theCode); $categoryTable->initCodeConf($theCode, $catTableConf); $categoryAnd = tx_ttproducts_model_control::getAndVar($categoryPivar); } $whereArray = ''; - if (!empty($piVars[tx_ttproducts_model_control::getPiVar($functablename)])) { - $whereArray = $piVars[tx_ttproducts_model_control::getPiVar($functablename)]; + if (!empty($piVars[tx_ttproducts_model_control::getPiVar($funcTablename)])) { + $whereArray = $piVars[tx_ttproducts_model_control::getPiVar($funcTablename)]; } if (is_array($whereArray)) { @@ -748,14 +748,14 @@ public function printView( if ( ($newitemdays || $theCode == 'LISTNEWITEMS') && - is_array($tableConfArray[$functablename]) && - is_array($tableConfArray[$functablename]['controlFields.']) + is_array($tableConfArray[$funcTablename]) && + is_array($tableConfArray[$funcTablename]['controlFields.']) ) { if (!$newitemdays) { $newitemdays = $conf['newItemDays']; } $temptime = time() - 86400 * intval(trim($newitemdays)); - $timeFieldArray = GeneralUtility::trimExplode(',', $tableConfArray[$functablename]['controlFields.']['newItemDays']); + $timeFieldArray = GeneralUtility::trimExplode(',', $tableConfArray[$funcTablename]['controlFields.']['newItemDays']); $whereTimeFieldArray = []; foreach ($timeFieldArray as $k => $value) { $whereTimeFieldArray[] = $tableAliasArray[$tablename] . '.' . $value . ' >= ' . $temptime; @@ -789,7 +789,7 @@ public function printView( tx_ttproducts_model_control::getSearchInfo( $cObj, $searchVars, - $functablename, + $funcTablename, $tablename, $searchboxWhere, $bUseSearchboxArray, @@ -829,8 +829,8 @@ public function printView( } } } - if ($allowedItems != '') { // formerly: !$tableConfArray[$functablename]['orderBy'] && - $tableConfArray[$functablename]['orderBy'] = 'FIELD(' . $prodAlias . '.uid, ' . $allowedItems . ')'; + if ($allowedItems != '') { // formerly: !$tableConfArray[$funcTablename]['orderBy'] && + $tableConfArray[$funcTablename]['orderBy'] = 'FIELD(' . $prodAlias . '.uid, ' . $allowedItems . ')'; } $whereAddress = ''; @@ -872,9 +872,9 @@ public function printView( if ($whereAddress == '') { // do not mix address with category filter $bForceCatParams = false; - if (isset($tableConfArray[$functablename]['filter.']) && is_array($tableConfArray[$functablename]['filter.']) && - isset($tableConfArray[$functablename]['filter.']['param.']) && is_array($tableConfArray[$functablename]['filter.']['param.']) && - $tableConfArray[$functablename]['filter.']['param.']['cat'] == 'gp') { + if (isset($tableConfArray[$funcTablename]['filter.']) && is_array($tableConfArray[$funcTablename]['filter.']) && + isset($tableConfArray[$funcTablename]['filter.']['param.']) && is_array($tableConfArray[$funcTablename]['filter.']['param.']) && + $tableConfArray[$funcTablename]['filter.']['param.']['cat'] == 'gp') { $bForceCatParams = true; } @@ -897,7 +897,7 @@ public function printView( } if ($whereCat == '' && ($allowedItems == '' || $bForceCatParams)) { - $neededParams = $itemTable->getNeededUrlParams($functablename, $theCode); + $neededParams = $itemTable->getNeededUrlParams($funcTablename, $theCode); $needArray = GeneralUtility::trimExplode(',', $neededParams); $bListStartEmpty = false; foreach ($needArray as $k => $param) { @@ -912,7 +912,7 @@ public function printView( } if ($searchboxWhere != '') { - if ($bUseSearchboxArray[$categoryfunctablename]) { + if ($bUseSearchboxArray[$categoryFuncTablename]) { $whereCat .= ' AND ' . $searchboxWhere; } else { $whereProduct = ' AND ' . $searchboxWhere; @@ -1085,7 +1085,7 @@ public function printView( $relatedArray = $categoryTable->getRelated($rootCat, $currentCat, $this->pidListObj->getPidlist()); // read only related categories; $excludeCat = 0; $categoryArray = $categoryTable->getRelationArray($relatedArray, $excludeCat, $rootCat, implode(',', array_keys($relatedArray))); - $rootCatArray = $categoryTable->getRootArray($rootCat, $categoryArray, $tableConfArray[$functablename]['autoRoot'] ?? 0); + $rootCatArray = $categoryTable->getRootArray($rootCat, $categoryArray, $tableConfArray[$funcTablename]['autoRoot'] ?? 0); if ($conf['clickItemsIntoSubmenu']) { $childCatArray = $categoryTable->getChildCategoryArray($currentCat); @@ -1095,7 +1095,7 @@ public function printView( } } - $limit = $tableConfArray[$functablename]['limit'] ?? $config['limit']; + $limit = $tableConfArray[$funcTablename]['limit'] ?? $config['limit']; $limit = intval($limit); $begin_at = 0; @@ -1361,16 +1361,16 @@ public function printView( $displayConf = []; // Get products count $displayConf['columns'] = ''; - if (isset($tableConfArray[$functablename]['displayColumns.'])) { - $displayConf['columns'] = $tableConfArray[$functablename]['displayColumns.']; + if (isset($tableConfArray[$funcTablename]['displayColumns.'])) { + $displayConf['columns'] = $tableConfArray[$funcTablename]['displayColumns.']; if (is_array($displayConf['columns'])) { $displayColumns = $displayConf['columns']['1']; ksort($displayConf['columns'], SORT_STRING); } } $displayConf['header'] = ''; - if (isset($tableConfArray[$functablename]['displayHeader.'])) { - $displayConf['header'] = $tableConfArray[$functablename]['displayHeader.']; + if (isset($tableConfArray[$funcTablename]['displayHeader.'])) { + $displayConf['header'] = $tableConfArray[$funcTablename]['displayHeader.']; if (is_array($displayConf['header'])) { ksort($displayConf['header'], SORT_STRING); } @@ -1381,16 +1381,16 @@ public function printView( $categorySorting = 'sorting'; } - $selectConf['orderBy'] = $tableConfArray[$functablename]['orderBy']; + $selectConf['orderBy'] = $tableConfArray[$funcTablename]['orderBy']; // performing query for display: if (!$selectConf['orderBy']) { $selectConf['orderBy'] = $conf['orderBy']; } $tmpArray = GeneralUtility::trimExplode(',', $selectConf['orderBy']); - $orderByArray[$functablename] = $tmpArray[0]; // $orderByProduct + $orderByArray[$funcTablename] = $tmpArray[0]; // $orderByProduct if ($useCategories) { - $orderByCat = $tableConfArray[$categoryfunctablename]['orderBy']; + $orderByCat = $tableConfArray[$categoryFuncTablename]['orderBy']; } // sorting by category not yet possible for articles @@ -1470,10 +1470,10 @@ public function printView( if ( $itemTable->getType() != 'product' ) { - $defaultFieldsArray = $tablesObj->get($functablename)->getTableObj()->getDefaultFieldArray(); + $defaultFieldsArray = $tablesObj->get($funcTablename)->getTableObj()->getDefaultFieldArray(); $tcaFieldsArray = TableUtility::getFields($tablename); - $noTcaFieldsArray = $tablesObj->get($functablename)->getTableObj()->getNoTcaFieldArray(); + $noTcaFieldsArray = $tablesObj->get($funcTablename)->getTableObj()->getNoTcaFieldArray(); $fieldsArray = array_merge($defaultFieldsArray, $tcaFieldsArray, $noTcaFieldsArray); } @@ -1557,7 +1557,7 @@ public function printView( $selectConf['from'] = $catTables . $tmpDelim . $selectConf['from']; } - if ($categoryTable->bUseLanguageTable($tableConfArray[$categoryfunctablename])) { + if ($categoryTable->bUseLanguageTable($tableConfArray[$categoryFuncTablename])) { $joinTables = $selectConf['leftjoin']; $categoryTable->getTableObj()->transformLanguage($joinTables, $selectConf['where'], true); $selectConf['leftjoin'] = $joinTables; @@ -1566,9 +1566,9 @@ public function printView( $collateConf = []; if ( - isset($tableConfArray[$functablename]['collate.']) + isset($tableConfArray[$funcTablename]['collate.']) ) { - $collateConf[$functablename] = $tableConfArray[$functablename]['collate.']; + $collateConf[$funcTablename] = $tableConfArray[$funcTablename]['collate.']; } $selectFields = implode(',', $fieldsArray); @@ -1647,8 +1647,8 @@ public function printView( // $selectConf['where'] = $join.$itemTable->getTableObj()->transformWhere($selectConf['where']); $selectConf['where'] = $join . ' ' . $selectConf['where']; - if (isset($tableConfArray[$functablename]['filter.']) && is_array($tableConfArray[$functablename]['filter.'])) { - $filterConf = $tableConfArray[$functablename]['filter.']; + if (isset($tableConfArray[$funcTablename]['filter.']) && is_array($tableConfArray[$funcTablename]['filter.'])) { + $filterConf = $tableConfArray[$funcTablename]['filter.']; if ( isset($filterConf['regexp.']) && @@ -1706,7 +1706,7 @@ public function printView( $GLOBALS['TYPO3_DB']->sql_free_result($res); $productsCount = (is_array($row) ? $row['0'] : 0); - $browserConf = $this->getBrowserConf($tableConfArray[$functablename]); // needed for the replacement of the method pi_linkTP_keepPIvars by BrowserUtility::linkTPKeepCtrlVars and the page browser + $browserConf = $this->getBrowserConf($tableConfArray[$funcTablename]); // needed for the replacement of the method pi_linkTP_keepPIvars by BrowserUtility::linkTPKeepCtrlVars and the page browser $maxPages = 10000; if (isset($browserConf['maxPages'])) { $maxPages = intval($browserConf['maxPages']); @@ -1744,8 +1744,8 @@ public function printView( $GLOBALS['TYPO3_DB']->stripOrderBy($selectConf['orderBy']); } - if (isset($tableConfArray[$functablename]['groupBy'])) { - $selectConf['groupBy'] = $tableConfArray[$functablename]['groupBy']; + if (isset($tableConfArray[$funcTablename]['groupBy'])) { + $selectConf['groupBy'] = $tableConfArray[$funcTablename]['groupBy']; $selectConf['groupBy'] = $itemTable->getTableObj()->transformOrderby($selectConf['groupBy']); @@ -1925,7 +1925,7 @@ public function printView( $theCode, $templateCode, $mergeTagArray, - $functablename, + $funcTablename, current($this->uidArray), $this->uidArray, $parentProductRow, @@ -2019,7 +2019,7 @@ public function printView( if ($useCategories) { if ( - empty($tableConfArray[$categoryfunctablename]['onlyDefaultCategory']) && + empty($tableConfArray[$categoryFuncTablename]['onlyDefaultCategory']) && $categoryTable->getFuncTablename() == 'tt_products_cat' ) { $currentCat = $row['category']; @@ -2027,7 +2027,7 @@ public function printView( $catArray = $categoryTable->getCategoryArray($row, $categorySorting); if ( - empty($tableConfArray[$categoryfunctablename]['onlyDefaultCategory']) && + empty($tableConfArray[$categoryFuncTablename]['onlyDefaultCategory']) && is_array($catArray) && count($catArray) ) { @@ -2174,7 +2174,7 @@ public function printView( $catRow = $categoryTable->get($displayCat); $categoryTableView->getItemSubpartArrays( $t['categoryAndItemsFrameWork'], - $functablename, + $funcTablename, $catRow, $categorySubpartArray, $categoryWrappedSubpartArray, @@ -2323,11 +2323,11 @@ public function printView( if ( isset($parentDataArray) && is_array($parentDataArray) && - isset($parentDataArray['functablename']) && + isset($parentDataArray['funcTablename']) && isset($parentDataArray['uid']) ) { if ( - $parentDataArray['functablename'] == 'tt_products' && + $parentDataArray['funcTablename'] == 'tt_products' && ( $conf['noArticleSingleView'] || $itemTable->getType() != 'article' @@ -2520,7 +2520,7 @@ public function printView( $allVariants = $basketObj->getAllVariants( - $functablename, + $funcTablename, $row, $prodVariantRow ); @@ -2553,7 +2553,7 @@ public function printView( $basketExt1, $basketExtra, $basketRecs, - $functablename, + $funcTablename, $externalRowArray, $theCode == 'LISTGIFTS' ); @@ -2597,7 +2597,7 @@ public function printView( } $basketItemView->getItemMarkerArray( - $functablename, + $funcTablename, true, $item, $markerArray, @@ -2619,7 +2619,7 @@ public function printView( $theCode, $templateCode, $viewTagArray, - $functablename, + $funcTablename, $row['uid'], $this->uidArray, $prodRow, @@ -2669,11 +2669,11 @@ public function printView( if ( $itemTable->getType() == 'product' && $useCategories && - isset($tableConfArray[$categoryfunctablename]) && - isset($tableConfArray[$categoryfunctablename]['tagmark.']) + isset($tableConfArray[$categoryFuncTablename]) && + isset($tableConfArray[$categoryFuncTablename]['tagmark.']) ) { $tagArray = []; - $tagConf = $tableConfArray[$categoryfunctablename]['tagmark.']; + $tagConf = $tableConfArray[$categoryFuncTablename]['tagmark.']; foreach ($catArray as $loopCategory) { $catRow = $categoryTable->get( @@ -2782,7 +2782,7 @@ public function printView( $basketItemView->getItemMarkerSubpartArrays( $t['item'], - $functablename, + $funcTablename, $row, $theCode, $viewTagArray, diff --git a/view/class.tx_ttproducts_memo_view.php b/view/class.tx_ttproducts_memo_view.php index 141319466..13c03274d 100644 --- a/view/class.tx_ttproducts_memo_view.php +++ b/view/class.tx_ttproducts_memo_view.php @@ -64,11 +64,11 @@ public function init( tx_ttproducts_control_memo::bUseFeuser($conf) || tx_ttproducts_control_memo::bUseSession($conf) ) { - $functablename = 'tt_products'; + $funcTablename = 'tt_products'; if (strpos($theCode, 'DAM') !== false) { - $functablename = 'tx_dam'; + $funcTablename = 'tx_dam'; } - $this->memoItems = tx_ttproducts_control_memo::getMemoItems($functablename); + $this->memoItems = tx_ttproducts_control_memo::getMemoItems($funcTablename); } } diff --git a/view/class.tx_ttproducts_menucat_view.php b/view/class.tx_ttproducts_menucat_view.php index 9caa959b3..afb272b52 100644 --- a/view/class.tx_ttproducts_menucat_view.php +++ b/view/class.tx_ttproducts_menucat_view.php @@ -47,7 +47,7 @@ class tx_ttproducts_menucat_view extends tx_ttproducts_catlist_view_base // returns the products list view public function printView( - $functablename, + $funcTablename, &$templateCode, $theCode, &$error_code, @@ -67,7 +67,7 @@ public function printView( $cObj = ControlApi::getCObj(); parent::getPrintViewArrays( - $functablename, + $funcTablename, $templateCode, $t, $htmlParts, @@ -91,7 +91,7 @@ public function printView( $markerObj = GeneralUtility::makeInstance('tx_ttproducts_marker'); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $categoryTableView = $tablesObj->get($functablename, true); + $categoryTableView = $tablesObj->get($funcTablename, true); $categoryTable = $categoryTableView->getModelObj(); $maxDepth = $categoryTable->getDepth($theCode); @@ -114,7 +114,7 @@ public function printView( $catConf['cssMode'] ??= 0; $cssObj = GeneralUtility::makeInstance('tx_ttproducts_css'); - $cssConf = $cssObj->getConf($functablename, $theCode); + $cssConf = $cssObj->getConf($funcTablename, $theCode); $fill = ''; $menu = 'm' . $depth; $idMain = $categoryTableView->getPivar() . $mainCount; diff --git a/view/class.tx_ttproducts_order_view.php b/view/class.tx_ttproducts_order_view.php index ce0ab60cc..7a21132da 100644 --- a/view/class.tx_ttproducts_order_view.php +++ b/view/class.tx_ttproducts_order_view.php @@ -54,7 +54,7 @@ protected function init2( $orderObj, $cnf, &$itemTable, - &$functablename, + &$funcTablename, &$tableconf, &$feusers_uid, &$validFeUser, @@ -77,9 +77,9 @@ protected function init2( $feusers_uid = FrontendUtility::getFrontEndUser('uid'); } - $functablename = $orderObj->getFuncTablename(); + $funcTablename = $orderObj->getFuncTablename(); - $tableconf = $cnf->getTableConf($functablename, $theCode); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); $validFeUser = false; if ($theCode == 'DOWNLOAD') { $downloadAuthorization = $cnf->getDownloadConf('authorization'); @@ -489,7 +489,7 @@ public function printView( $markerObj = GeneralUtility::makeInstance('tx_ttproducts_marker'); $feusers_uid = 0; $itemTable = null; - $functablename = ''; + $funcTablename = ''; $tableconf = []; $validFeUser = false; $pid = 0; @@ -507,7 +507,7 @@ public function printView( $orderObj, $cnf, $itemTable, - $functablename, + $funcTablename, $tableconf, $feusers_uid, $validFeUser, @@ -762,10 +762,10 @@ public function printView( $from = ''; } elseif ($fegroups_uid) { $orderAlias = $orderObj->getAlias(); - $from = $functablename . ' ' . $orderAlias . ' LEFT JOIN fe_users ON ' . $orderAlias . '.feusers_uid = fe_users.uid'; + $from = $funcTablename . ' ' . $orderAlias . ' LEFT JOIN fe_users ON ' . $orderAlias . '.feusers_uid = fe_users.uid'; $where = 'fe_users.usergroup = ' . $fegroups_uid; } - $whereArray = $piVars[tx_ttproducts_model_control::getPiVar($functablename)] ?? ''; + $whereArray = $piVars[tx_ttproducts_model_control::getPiVar($funcTablename)] ?? ''; if (is_array($whereArray)) { foreach ($whereArray as $field => $value) { @@ -891,7 +891,7 @@ public function printDownloadView( $orderObj, $cnf, $itemTable, - $functablename, + $funcTablename, $tableconf, $feusers_uid, $validFeUser, diff --git a/view/class.tx_ttproducts_orderaddress_view.php b/view/class.tx_ttproducts_orderaddress_view.php index 6548f1c83..01b0e643a 100644 --- a/view/class.tx_ttproducts_orderaddress_view.php +++ b/view/class.tx_ttproducts_orderaddress_view.php @@ -137,7 +137,7 @@ public function getWrappedSubpartArray( * @access private */ public function getAddressMarkerArray( - $functablename, + $funcTablename, $row, &$markerArray, $bSelect, diff --git a/view/class.tx_ttproducts_page_view.php b/view/class.tx_ttproducts_page_view.php index a48ccd769..47cc3f242 100644 --- a/view/class.tx_ttproducts_page_view.php +++ b/view/class.tx_ttproducts_page_view.php @@ -76,13 +76,13 @@ public function getMarkerArray( $prefix, $linkWrap = '' ): void { - $functablename = $this->modelObj->getFuncTablename(); + $funcTablename = $this->modelObj->getFuncTablename(); $row = $this->modelObj->get($pid); // $imageObj = GeneralUtility::makeInstance('tx_ttproducts_field_image_view'); // // // Get image // $imageObj->getRowMarkerArrayEnhanced( - // $functablename, + // $funcTablename, // $row, // $this->marker, // $markerArray, @@ -107,7 +107,7 @@ public function getMarkerArray( ); parent::getRowMarkerArray( - $functablename, + $funcTablename, $row, $markerKey, $markerArray, diff --git a/view/class.tx_ttproducts_product_view.php b/view/class.tx_ttproducts_product_view.php index dbbbd0810..614f91104 100644 --- a/view/class.tx_ttproducts_product_view.php +++ b/view/class.tx_ttproducts_product_view.php @@ -65,7 +65,7 @@ public function init( public function getItemMarkerSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, &$markerArray, &$subpartArray, @@ -85,7 +85,7 @@ public function getItemMarkerSubpartArrays( parent::getItemMarkerSubpartArrays( $templateCode, - $functablename, + $funcTablename, $row, $markerArray, $subpartArray, @@ -119,7 +119,7 @@ public function getItemMarkerSubpartArrays( $datafieldViewObj->getItemSubpartArrays( $templateCode, $this->getMarker(), - $functablename, + $funcTablename, $row, 'datasheet_uid', $this->getModelObj()->getTableConf($theCode), diff --git a/view/class.tx_ttproducts_relatedlist_view.php b/view/class.tx_ttproducts_relatedlist_view.php index 6e5e1ca9e..b96808cc4 100644 --- a/view/class.tx_ttproducts_relatedlist_view.php +++ b/view/class.tx_ttproducts_relatedlist_view.php @@ -125,7 +125,7 @@ public function getAddListArray( 'code' => 'LISTRELATEDARTICLES', 'additionalPages' => $conf['pidsRelatedArticles'] ?? '', 'mergeRow' => [], - 'functablename' => 'tt_products_articles', + 'funcTablename' => 'tt_products_articles', 'callFunctableArray' => [], 'cached' => true, ], @@ -136,7 +136,7 @@ public function getAddListArray( 'code' => 'LISTRELATEDACCESSORY', 'additionalPages' => $conf['pidsRelatedAccessories'] ?? '', 'mergeRow' => [], - 'functablename' => 'tt_products', + 'funcTablename' => 'tt_products', 'callFunctableArray' => [], 'cached' => true, ], @@ -147,7 +147,7 @@ public function getAddListArray( 'code' => 'LISTRELATED', 'additionalPages' => $conf['pidsRelatedProducts'] ?? '', 'mergeRow' => [], - 'functablename' => 'tt_products', + 'funcTablename' => 'tt_products', 'callFunctableArray' => [], 'cached' => true, ], @@ -158,7 +158,7 @@ public function getAddListArray( 'code' => 'LISTRELATEDBYSYSTEMCATEGORY', 'additionalPages' => $conf['pidsRelatedProducts'] ?? '', 'mergeRow' => [], - 'functablename' => 'tt_products', + 'funcTablename' => 'tt_products', 'callFunctableArray' => [], 'cached' => false, ], @@ -169,7 +169,7 @@ public function getAddListArray( 'code' => 'LISTRELATEDCOMPLETEDOWNLOAD', 'additionalPages' => $conf['pidsRelatedDownloads'] ?? '', 'mergeRow' => [], - 'functablename' => 'sys_file_reference', + 'funcTablename' => 'sys_file_reference', 'callFunctableArray' => [], 'cached' => true, ], @@ -180,7 +180,7 @@ public function getAddListArray( 'code' => 'LISTRELATEDALLDOWNLOAD', 'additionalPages' => $conf['pidsRelatedDownloads'] ?? '', 'mergeRow' => [], - 'functablename' => 'sys_file_reference', + 'funcTablename' => 'sys_file_reference', 'callFunctableArray' => [], 'cached' => true, ], @@ -191,7 +191,7 @@ public function getAddListArray( 'code' => 'LISTRELATEDPARTIALDOWNLOAD', 'additionalPages' => $conf['pidsRelatedDownloads'] ?? '', 'mergeRow' => [], - 'functablename' => 'sys_file_reference', + 'funcTablename' => 'sys_file_reference', 'callFunctableArray' => [], 'cached' => true, ], @@ -218,7 +218,7 @@ public function getAddListArray( 'code' => $theCode, 'additionalPages' => false, 'mergeRow' => $extArray, - 'functablename' => 'tt_products', + 'funcTablename' => 'tt_products', 'callFunctableArray' => [$marker => 'tx_dam'], 'cached' => true, ], @@ -306,9 +306,9 @@ public function getListMarkerArray( if (isset($viewTagArray[$funcArray['marker']]) && $funcArray['require']) { $relatedItemObj = $itemObj; $parentFuncTablename = ''; - if ($funcTablename != $funcArray['functablename']) { - $relatedItemObj = $tablesObj->get($funcArray['functablename'], false); - $parentFuncTablename = $funcArray['functablename']; + if ($funcTablename != $funcArray['funcTablename']) { + $relatedItemObj = $tablesObj->get($funcArray['funcTablename'], false); + $parentFuncTablename = $funcArray['funcTablename']; } $tableConf = $relatedItemObj->getTableConf($funcArray['code']); $orderBy = ''; @@ -348,7 +348,7 @@ public function getListMarkerArray( } $parentDataArray = [ - 'functablename' => $funcTablename, + 'funcTablename' => $funcTablename, 'uid' => $uid, ]; @@ -358,7 +358,7 @@ public function getListMarkerArray( $tmpContent = $listView->printView( $templateCode, $funcArray['code'], - $funcArray['functablename'], + $funcArray['funcTablename'], implode(',', $relatedIds), $listPids, '', diff --git a/view/class.tx_ttproducts_selectcat_view.php b/view/class.tx_ttproducts_selectcat_view.php index 8be07be01..6b3ef905b 100644 --- a/view/class.tx_ttproducts_selectcat_view.php +++ b/view/class.tx_ttproducts_selectcat_view.php @@ -49,7 +49,7 @@ class tx_ttproducts_selectcat_view extends tx_ttproducts_catlist_view_base // returns the products list view public function printView( - $functablename, + $funcTablename, &$templateCode, $theCode, &$error_code, @@ -66,7 +66,7 @@ public function printView( $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); $languageObj = GeneralUtility::makeInstance(Localization::class); - $categoryTableView = $tablesObj->get($functablename, 1); + $categoryTableView = $tablesObj->get($funcTablename, 1); $categoryTable = $categoryTableView->getModelObj(); $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); $conf = $cnf->getConf(); @@ -78,7 +78,7 @@ public function printView( $ctrlArray = []; parent::getPrintViewArrays( - $functablename, + $funcTablename, $templateCode, $t, $htmlParts, @@ -113,7 +113,7 @@ public function printView( $contentId = substr($this->cObj->currentRecord, $contentIdPos + 1); } - $menu = $conf['CSS.'][$functablename . '.']['menu']; + $menu = $conf['CSS.'][$funcTablename . '.']['menu']; $menu = ($menu ?: $categoryTableView->getPivar() . '-' . $contentId . '-' . $depth); $fillOnchange = ''; if ($method == 'clickShow') { diff --git a/view/class.tx_ttproducts_table_base_view.php b/view/class.tx_ttproducts_table_base_view.php index dbd2d437a..9a27a10f8 100644 --- a/view/class.tx_ttproducts_table_base_view.php +++ b/view/class.tx_ttproducts_table_base_view.php @@ -191,7 +191,7 @@ public function setMarkersEmpty( public function getItemSubpartArrays( &$templateCode, - $functablename, + $funcTablename, $row, &$subpartArray, &$wrappedSubpartArray, @@ -204,7 +204,7 @@ public function getItemSubpartArrays( ): void { $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableconf = $cnf->getTableConf($functablename, $theCode); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); if ( isset($row) && @@ -319,7 +319,7 @@ public function getItemSubpartArrays( } } - $itemTableObj = $tablesObj->get($functablename, false); + $itemTableObj = $tablesObj->get($funcTablename, false); $tablename = $itemTableObj->getTablename(); foreach ($row as $field => $value) { @@ -415,7 +415,7 @@ public function getItemSubpartArrays( $fieldViewObj->getItemSubpartArrays( $templateCode, $this->marker, - $functablename, + $funcTablename, $row, $field, $tableconf, @@ -437,7 +437,7 @@ public function getItemSubpartArrays( $wrappedSubpartArray['###' . $markerKey . '###'] = ''; } } else { // if !empty($row) - $itemTableObj = $tablesObj->get($functablename, false); + $itemTableObj = $tablesObj->get($funcTablename, false); $tablename = $itemTableObj->getTablename(); $markerKey = $this->marker . '_NOT_EMPTY'; if (isset($tagArray[$markerKey])) { @@ -461,8 +461,8 @@ public function getMarkerKey($markerKey) if ($this->marker) { $marker = $this->marker; } else { - $functablename = $this->getModelObj()->getFuncTablename(); - $marker = strtoupper($functablename); + $funcTablename = $this->getModelObj()->getFuncTablename(); + $marker = strtoupper($funcTablename); } } @@ -471,8 +471,8 @@ public function getMarkerKey($markerKey) public function getId($row, $midId, $theCode) { - $functablename = $this->getModelObj()->getFuncTablename(); - $extTableName = str_replace('_', '-', $functablename); + $funcTablename = $this->getModelObj()->getFuncTablename(); + $extTableName = str_replace('_', '-', $funcTablename); $preId = $extTableName; if ($midId) { @@ -568,7 +568,7 @@ public function createFieldMarkerArray($row, $markerPrefix, $suffix) // This can also add additional fields to the row. public function getRowMarkerArray( - $functablename, + $funcTablename, $row, $markerKey, &$markerArray, @@ -627,15 +627,15 @@ public function getRowMarkerArray( } } $row = $newRow; - $functablename = $this->getModelObj()->getFuncTablename(); - $extTableName = str_replace('_', '-', $functablename); + $funcTablename = $this->getModelObj()->getFuncTablename(); + $extTableName = str_replace('_', '-', $funcTablename); $mainId = $this->getId($row, $id, $theCode); $markerPrefix = ($marker != '' ? $marker . '_' : ''); $rowMarkerArray['###' . $markerPrefix . 'ID###'] = $mainId; $rowMarkerArray['###' . $markerPrefix . 'NAME###'] = $extTableName . '-' . $row['uid']; - $tableconf = $cnf->getTableConf($functablename, $theCode); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); - $tabledesc = $cnf->getTableDesc($functablename); + $tabledesc = $cnf->getTableDesc($funcTablename); $fieldMarkerArray = $this->createFieldMarkerArray($row, $markerPrefix, $suffix); @@ -681,7 +681,7 @@ public function getRowMarkerArray( $fieldViewObj = $this->getObj($classname); $modifiedRow = $fieldViewObj->getRowMarkerArray( - $functablename, + $funcTablename, $field, $row, $markerKey, @@ -733,7 +733,7 @@ public function getRowMarkerArray( } } else { $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $tablename = $cnf->getTableName($functablename); + $tablename = $cnf->getTableName($funcTablename); // $tablename = $this->getModelObj()->getTablename(); $tmpMarkerArray = []; $tmpMarkerArray[] = $marker; @@ -765,7 +765,7 @@ public function getRowMarkerArray( $this, $rowMarkerArray, $cObjectMarkerArray, - $functablename, + $funcTablename, $row, $imageNum, $imageRenderObj, @@ -785,7 +785,7 @@ protected function getRowMarkerArrayHooks( $pObj, &$markerArray, &$cObjectMarkerArray, - $functablename, + $funcTablename, $row, $imageNum, $imageRenderObj, @@ -811,7 +811,7 @@ protected function getRowMarkerArrayHooks( $pObj, $markerArray, $cObjectMarkerArray, - $functablename, + $funcTablename, $row, $imageNum, $imageRenderObj, diff --git a/view/field/class.tx_ttproducts_field_base_view.php b/view/field/class.tx_ttproducts_field_base_view.php index 3b300d881..09664327e 100644 --- a/view/field/class.tx_ttproducts_field_base_view.php +++ b/view/field/class.tx_ttproducts_field_base_view.php @@ -86,7 +86,7 @@ public function getRepeatedRowSubpartArrays( public function getRepeatedRowMarkerArray( &$markerArray, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $key, @@ -105,7 +105,7 @@ public function getRepeatedSubpartArrays( &$wrappedSubpartArray, $templateCode, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $tableConf, @@ -140,7 +140,7 @@ public function getRepeatedSubpartArrays( $resultRowMarker = $this->getRepeatedRowMarkerArray( $repeatedMarkerArray, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $key, diff --git a/view/field/class.tx_ttproducts_field_creditpoints_view.php b/view/field/class.tx_ttproducts_field_creditpoints_view.php index 1ce62a5dd..07756a751 100644 --- a/view/field/class.tx_ttproducts_field_creditpoints_view.php +++ b/view/field/class.tx_ttproducts_field_creditpoints_view.php @@ -55,7 +55,7 @@ public function modifyItemSubpartRow($fieldname, $row, &$addedFieldArray) } public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, diff --git a/view/field/class.tx_ttproducts_field_datafield_view.php b/view/field/class.tx_ttproducts_field_datafield_view.php index 633ac2f7c..d8e0bdd48 100644 --- a/view/field/class.tx_ttproducts_field_datafield_view.php +++ b/view/field/class.tx_ttproducts_field_datafield_view.php @@ -115,7 +115,7 @@ public function getRepeatedRowSubpartArrays( public function getItemSubpartArrays( &$templateCode, $markerKey, - $functablename, + $funcTablename, &$row, $fieldname, $tableConf, @@ -133,7 +133,7 @@ public function getItemSubpartArrays( $dirname = ''; $dataFileArray = $this->getModelObj()->getDataFileArray( - $functablename, + $funcTablename, $row, $fieldname ); @@ -143,7 +143,7 @@ public function getItemSubpartArrays( $wrappedSubpartArray, $templateCode, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $tableConf, @@ -197,7 +197,7 @@ public function getItemSubpartArrays( public function getRepeatedRowMarkerArray( &$markerArray, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $key, @@ -330,7 +330,7 @@ public function getIconMarker( * @access private */ public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -395,7 +395,7 @@ public function getRowMarkerArray( // alle Files holen $dataFileArray = $this->getModelObj()->getDataFileArray( - $functablename, + $funcTablename, $row, $fieldname ); diff --git a/view/field/class.tx_ttproducts_field_datetime_view.php b/view/field/class.tx_ttproducts_field_datetime_view.php index 3dc35c48b..18fb62cf9 100644 --- a/view/field/class.tx_ttproducts_field_datetime_view.php +++ b/view/field/class.tx_ttproducts_field_datetime_view.php @@ -42,7 +42,7 @@ class tx_ttproducts_field_datetime_view extends tx_ttproducts_field_base_view { public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -65,7 +65,7 @@ public function getRowMarkerArray( ) { $cObj = FrontendUtility::getContentObjectRenderer(); $stdWrap = 'date_stdWrap.'; - if ($fieldname == 'usebydate' && $functablename == 'tt_products') { + if ($fieldname == 'usebydate' && $funcTablename == 'tt_products') { $stdWrap = 'usebyDate_stdWrap.'; } $value = $cObj->stdWrap($row[$fieldname], $this->conf[$stdWrap]); diff --git a/view/field/class.tx_ttproducts_field_delivery_view.php b/view/field/class.tx_ttproducts_field_delivery_view.php index 0363b0196..8869668b1 100644 --- a/view/field/class.tx_ttproducts_field_delivery_view.php +++ b/view/field/class.tx_ttproducts_field_delivery_view.php @@ -53,7 +53,7 @@ class tx_ttproducts_field_delivery_view extends tx_ttproducts_field_base_view * @access private */ public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -80,7 +80,7 @@ public function getRowMarkerArray( if (isset($row[$fieldname])) { $imageObj = GeneralUtility::makeInstance('tx_ttproducts_field_image_view'); $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableconf = $cnf->getTableConf($functablename, $theCode); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); $domain = $conf['domain'] ?? ''; $cObj = FrontendUtility::getContentObjectRenderer(); diff --git a/view/field/class.tx_ttproducts_field_foreign_table_view.php b/view/field/class.tx_ttproducts_field_foreign_table_view.php index 2bc96f877..f117f0ef4 100644 --- a/view/field/class.tx_ttproducts_field_foreign_table_view.php +++ b/view/field/class.tx_ttproducts_field_foreign_table_view.php @@ -44,7 +44,7 @@ class tx_ttproducts_field_foreign_table_view extends tx_ttproducts_field_base_vi public function getItemSubpartArrays( &$templateCode, $markerKey, - $functablename, + $funcTablename, &$row, $fieldname, $tableConf, @@ -57,12 +57,12 @@ public function getItemSubpartArrays( $id = '1' ): void { $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $itemTableObj = $tablesObj->get($functablename, false); + $itemTableObj = $tablesObj->get($funcTablename, false); $tablename = $itemTableObj->getTablename(); } public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -84,7 +84,7 @@ public function getRowMarkerArray( $bEnableTaxZero = false ) { $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $itemTableObj = $tablesObj->get($functablename, false); + $itemTableObj = $tablesObj->get($funcTablename, false); $tablename = $itemTableObj->getTablename(); $foreigntablename = ''; $rowMarkerArray = []; diff --git a/view/field/class.tx_ttproducts_field_graduated_price_view.php b/view/field/class.tx_ttproducts_field_graduated_price_view.php index d1b69d15d..7f48c3cef 100644 --- a/view/field/class.tx_ttproducts_field_graduated_price_view.php +++ b/view/field/class.tx_ttproducts_field_graduated_price_view.php @@ -44,7 +44,7 @@ class tx_ttproducts_field_graduated_price_view extends tx_ttproducts_field_base_ public function getItemSubpartArrays( $templateCode, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $tableConf, @@ -59,7 +59,7 @@ public function getItemSubpartArrays( $bTaxIncluded = $this->conf['TAXincluded']; $bEnableTaxZero = 0; $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $viewItemTableObj = $tablesObj->get($functablename, true); + $viewItemTableObj = $tablesObj->get($funcTablename, true); $priceFormulaArray = $viewItemTableObj->getModelObj()->getGraduatedPriceObject()->getFormulasByItem($row['uid']); $priceTablesViewObj = $viewItemTableObj->getGraduatedPriceObject(); @@ -81,7 +81,7 @@ public function getItemSubpartArrays( } public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -104,7 +104,7 @@ public function getRowMarkerArray( ): void { $bTaxIncluded = $this->conf['TAXincluded']; $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $viewItemTableObj = $tablesObj->get($functablename, true); + $viewItemTableObj = $tablesObj->get($funcTablename, true); $priceTablesViewObj = $viewItemTableObj->getGraduatedPriceObject(); $priceTablesViewObj->getPriceMarkerArray( diff --git a/view/field/class.tx_ttproducts_field_image_view.php b/view/field/class.tx_ttproducts_field_image_view.php index db07acd1d..5bb276ab1 100644 --- a/view/field/class.tx_ttproducts_field_image_view.php +++ b/view/field/class.tx_ttproducts_field_image_view.php @@ -39,7 +39,7 @@ class tx_ttproducts_field_image_view extends tx_ttproducts_field_media_view { public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -61,7 +61,7 @@ public function getRowMarkerArray( $bEnableTaxZero = false ): void { parent::getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, diff --git a/view/field/class.tx_ttproducts_field_instock_view.php b/view/field/class.tx_ttproducts_field_instock_view.php index 1f37a2b59..fa87d0cf6 100644 --- a/view/field/class.tx_ttproducts_field_instock_view.php +++ b/view/field/class.tx_ttproducts_field_instock_view.php @@ -39,7 +39,7 @@ class tx_ttproducts_field_instock_view extends tx_ttproducts_field_base_view { public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, diff --git a/view/field/class.tx_ttproducts_field_media_view.php b/view/field/class.tx_ttproducts_field_media_view.php index 64ded53f5..efc2a9a3d 100644 --- a/view/field/class.tx_ttproducts_field_media_view.php +++ b/view/field/class.tx_ttproducts_field_media_view.php @@ -254,7 +254,7 @@ public function getMarkerkey( } public function getCodeMarkerArray( - $functablename, + $funcTablename, $markerKey, $theCode, $imageRow, @@ -270,7 +270,7 @@ public function getCodeMarkerArray( ) { $cObj = GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer'); // Local cObj. $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $theTableObj = $tablesObj->get($functablename); + $theTableObj = $tablesObj->get($funcTablename); $theTablename = $theTableObj->getTablename(); $cObj->start($imageRow, $theTablename); $tableConf = []; @@ -281,7 +281,7 @@ public function getCodeMarkerArray( if (is_array($imageArray) && count($imageArray)) { $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableConf = $cnf->getTableConf($functablename, $theCode); + $tableConf = $cnf->getTableConf($funcTablename, $theCode); if (is_array($tableConf) && isset($tableConf['imageMarker.'])) { $imageMarkerArray = $tableConf['imageMarker.']; } @@ -495,7 +495,7 @@ public function getCodeMarkerArray( } private function getMediaMarkerArray( - $functablename, + $funcTablename, $fieldname, &$row, $mediaNum, @@ -518,9 +518,9 @@ private function getMediaMarkerArray( $imageMarkerArray = []; $dirname = ''; $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableConf = $cnf->getTableConf($functablename, $theCode); + $tableConf = $cnf->getTableConf($funcTablename, $theCode); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $theTableObj = $tablesObj->get($functablename); + $theTableObj = $tablesObj->get($funcTablename); $theTablename = $theTableObj->getTablename(); $cObj = FrontendUtility::getContentObjectRenderer(); @@ -535,7 +535,7 @@ private function getMediaMarkerArray( } $imgs = []; $imageField = 'image'; - if ($functablename == 'pages') { + if ($funcTablename == 'pages') { $imageField = 'media'; } @@ -586,7 +586,7 @@ private function getMediaMarkerArray( } // $confParentTableConf = $this->getTableConf($conftable, $theCode); - $conftable = ($conftable ?: $functablename); + $conftable = ($conftable ?: $funcTablename); $generateArray = ['generateImage', 'generatePath']; $nameArray = []; @@ -700,7 +700,7 @@ private function getMediaMarkerArray( // +++ $linkWrap = false; $theImgCode = $this->getCodeMarkerArray( - $functablename, + $funcTablename, $markerKey, $theCode, $imageRow, @@ -811,7 +811,7 @@ private function getMediaMarkerArray( } public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -865,7 +865,7 @@ public function getRowMarkerArray( if (!$mediaNum) { $mediaNum = $this->getModelObj()->getMediaNum( - $functablename, + $funcTablename, $fieldname, $theCode ); @@ -873,7 +873,7 @@ public function getRowMarkerArray( if ($mediaNum) { $this->getMediaMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $mediaNum, diff --git a/view/field/class.tx_ttproducts_field_note_view.php b/view/field/class.tx_ttproducts_field_note_view.php index 0011d6c01..4a13009da 100644 --- a/view/field/class.tx_ttproducts_field_note_view.php +++ b/view/field/class.tx_ttproducts_field_note_view.php @@ -42,7 +42,7 @@ class tx_ttproducts_field_note_view extends tx_ttproducts_field_base_view { public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, diff --git a/view/field/class.tx_ttproducts_field_price_view.php b/view/field/class.tx_ttproducts_field_price_view.php index e490a1e68..ffca9da06 100644 --- a/view/field/class.tx_ttproducts_field_price_view.php +++ b/view/field/class.tx_ttproducts_field_price_view.php @@ -222,7 +222,7 @@ public static function convertKey($priceType, $fieldname) } public function getModelMarkerArray( - $functablename, + $funcTablename, $basketExtra, $basketRecs, $field, @@ -239,7 +239,7 @@ public function getModelMarkerArray( $languageObj = GeneralUtility::makeInstance(Localization::class); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $itemTableView = $tablesObj->get($functablename, true); + $itemTableView = $tablesObj->get($funcTablename, true); $itemTable = $itemTableView->getModelObj(); $modelObj = $this->getModelObj(); $totalDiscountField = FieldInterface::DISCOUNT; @@ -321,7 +321,7 @@ public function getModelMarkerArray( } // getModelMarkerArray public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -346,7 +346,7 @@ public function getRowMarkerArray( $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); $conf = $cnf->getConf(); $tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables'); - $itemTableView = $tablesObj->get($functablename, true); + $itemTableView = $tablesObj->get($funcTablename, true); $itemTable = $itemTableView->getModelObj(); $modelObj = $this->getModelObj(); $totalDiscountField = FieldInterface::DISCOUNT; diff --git a/view/field/class.tx_ttproducts_field_tax_view.php b/view/field/class.tx_ttproducts_field_tax_view.php index 13a581522..4cb99f404 100644 --- a/view/field/class.tx_ttproducts_field_tax_view.php +++ b/view/field/class.tx_ttproducts_field_tax_view.php @@ -44,7 +44,7 @@ class tx_ttproducts_field_tax_view extends tx_ttproducts_field_base_view public function getItemSubpartArrays( &$templateCode, $markerKey, - $functablename, + $funcTablename, $row, $fieldname, $tableConf, @@ -77,7 +77,7 @@ public function getItemSubpartArrays( } public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, diff --git a/view/field/class.tx_ttproducts_field_text_view.php b/view/field/class.tx_ttproducts_field_text_view.php index db0037d1d..48f6ee78a 100644 --- a/view/field/class.tx_ttproducts_field_text_view.php +++ b/view/field/class.tx_ttproducts_field_text_view.php @@ -42,7 +42,7 @@ class tx_ttproducts_field_text_view extends tx_ttproducts_field_base_view { public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, @@ -65,7 +65,7 @@ public function getRowMarkerArray( ) { $htmlentitiesArray = []; $cnf = GeneralUtility::makeInstance('tx_ttproducts_config'); - $tableconf = $cnf->getTableConf($functablename, $theCode); + $tableconf = $cnf->getTableConf($funcTablename, $theCode); if (is_array($tableconf['functions.']) && isset($tableconf['functions.']['htmlentities'])) { $htmlentitiesArray = GeneralUtility::trimExplode(',', $tableconf['functions.']['htmlentities']); diff --git a/view/field/interface.tx_ttproducts_field_view_int.php b/view/field/interface.tx_ttproducts_field_view_int.php index 9aaf7dd71..301685800 100644 --- a/view/field/interface.tx_ttproducts_field_view_int.php +++ b/view/field/interface.tx_ttproducts_field_view_int.php @@ -45,7 +45,7 @@ public function needsInit(); public function getModelObj(); public function getRowMarkerArray( - $functablename, + $funcTablename, $fieldname, $row, $markerKey, diff --git a/view/interface.tx_ttproducts_edit_variant_view_int.php b/view/interface.tx_ttproducts_edit_variant_view_int.php index cf6f4bcf4..1240e2048 100644 --- a/view/interface.tx_ttproducts_edit_variant_view_int.php +++ b/view/interface.tx_ttproducts_edit_variant_view_int.php @@ -42,7 +42,7 @@ public function init($modelObj); public function getSubpartMarkerArray( $templateCode, - $functablename, + $funcTablename, $row, $theCode, $bEditable,