From 929bec179ea5c2c7693f1b83dbe7ea328a6ae8aa Mon Sep 17 00:00:00 2001 From: Georgi Mateev <georgi.mateev@sgalinski.de> Date: Fri, 18 Oct 2024 19:33:27 +0300 Subject: [PATCH] [BUGFIX] Code review --- Classes/Filter/QueryStringFilter.php | 12 ------------ Classes/Utility/FlexFormUtility.php | 14 ++++++-------- Resources/Private/Language/de.locallang.xlf | 6 +++--- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/Classes/Filter/QueryStringFilter.php b/Classes/Filter/QueryStringFilter.php index bca26a0..cc0cbcd 100644 --- a/Classes/Filter/QueryStringFilter.php +++ b/Classes/Filter/QueryStringFilter.php @@ -38,8 +38,6 @@ class QueryStringFilter implements FilterInterface { public function __construct(array $filterValues, array $filterConfig) { $this->filterValues = $filterValues; $this->filterConfig = $filterConfig; - -// $this->applyDefaultFilterValues(); } /** @@ -70,14 +68,4 @@ class QueryStringFilter implements FilterInterface { public function setFilterValues(array $filterValues): void { $this->filterValues = $filterValues; } - - protected function applyDefaultFilterValues(): void { - if (isset($this->filterConfig['defaultValues']) && !empty($this->filterConfig['defaultValues'])) { - foreach ($this->filterConfig['defaultValues'] as $key => $value) { - if (!isset($this->filterValues[$key])) { - $this->filterValues[$key] = $value; - } - } - } - } } diff --git a/Classes/Utility/FlexFormUtility.php b/Classes/Utility/FlexFormUtility.php index 67fabb0..86af1f7 100644 --- a/Classes/Utility/FlexFormUtility.php +++ b/Classes/Utility/FlexFormUtility.php @@ -2,19 +2,25 @@ /*************************************************************** * Copyright notice + * * (c) sgalinski Internet Services (https://www.sgalinski.de) + * * All rights reserved + * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. + * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. + * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. + * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ @@ -29,11 +35,6 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; class FlexFormUtility { - /** - * Generate dynamic filter checkboxes in the FlexForm - * - * @return array - */ /** * Get the dynamic options for the select field * @@ -42,9 +43,6 @@ class FlexFormUtility */ public function getOptions(array &$config) { - // Get the current page ID from the FlexForm context - $pageId = (int) $config['effectivePid']; - $configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class); $fullTypoScript = $configurationManager->getConfiguration( ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index 2d6d3c0..b9c9826 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -251,7 +251,7 @@ </trans-unit> <trans-unit id="configuration.uncached" resname="configuration.uncached" approved="yes"> <source><![CDATA[Uncached]]></source> - <target><![CDATA[Ungecachet]]></target> + <target><![CDATA[Ungecached]]></target> </trans-unit> <trans-unit id="configuration.uncached.description" resname="configuration.uncached.description" approved="yes"> <source><![CDATA[If you use frontend filters or you want the plugin to be uncached - set this value to 1]]></source> @@ -282,8 +282,8 @@ <target>Filter</target> </trans-unit> <trans-unit id="flexform.backend.filters.description"> - <source>Below are the available Frontend filters. Select which of them you would like to activate for this plugin instance.</source> - <target>Nachfolgend finden Sie die verfügbaren Frontend-Filter. Wählen Sie aus, welche davon Sie für diese Plugin-Instanz aktivieren möchten.</target> + <source>Below are the available Frontend filters. Select which of them you would like to activate for this plugin instance. If you select any of the filters, you must set the extension to uncached. Please refer to the official extension documentation.</source> + <target>Nachfolgend finden Sie die verfügbaren Frontend-Filter. Wählen Sie aus, welche davon Sie für diese Plugin-Instanz aktivieren möchten. Wenn Sie einen der Filter auswählen, müssen Sie die Erweiterung auf uncached setzen. Bitte lesen Sie die offizielle Dokumentation der Erweiterung.</target> </trans-unit> <trans-unit id="response.noItemsFound"> <source>No videos found</source> -- GitLab