Skip to content
Snippets Groups Projects
Commit 589663be authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

Merge branch 'upgrade_TYPO3v12_phase3' into 'master'

[TASK] Prepare TYPO3 12

See merge request !8
parents 05e6af60 9e0a4579
No related branches found
No related tags found
1 merge request!8[TASK] Prepare TYPO3 12
Showing
with 140 additions and 242 deletions
<?php
/**
*
* Copyright notice
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
* 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.
* 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.
* 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 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!
*/
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
namespace SGalinski\ContentReplacer\Middleware;
......@@ -51,20 +50,20 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
*
* @var array
*/
protected $extensionConfiguration = [];
protected array $extensionConfiguration = [];
/**
* @var TermRepository
*/
protected $termRepository;
protected TermRepository $termRepository;
/**
* Constructor: Initializes the internal class properties.
*
* Note: The extension configuration array consists of the global and typoscript configuration.
*
* @throws ImmediateResponseException
*/
* Constructor: Initializes the internal class properties.
*
* Note: The extension configuration array consists of the global and typoscript configuration.
*
* @throws ImmediateResponseException
*/
public function __construct() {
$this->extensionConfiguration = $this->prepareConfiguration();
$this->termRepository = GeneralUtility::makeInstance(TermRepository::class);
......@@ -88,7 +87,6 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
$content = $this->parseAndReplace($customParser, $content);
}
// StreamFactory is not available in TYPO3 9 yet.
$streamFactory = GeneralUtility::makeInstance(StreamFactory::class);
$stream = $streamFactory->createStream($content);
......@@ -140,12 +138,12 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
break;
}
$occurences = $parser->parse($content);
if (!count($occurences)) {
$occurrences = $parser->parse($content);
if (!count($occurrences)) {
break;
}
foreach ($occurences as $category => $terms) {
foreach ($occurrences as $category => $terms) {
$content = $parser->replaceByCategory($category, $terms, $content);
}
}
......@@ -154,12 +152,12 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
}
/**
* Returns the merged extension configuration of the global configuration and the typoscript
* settings.
*
* @return array
* @throws ImmediateResponseException
*/
* Returns the merged extension configuration of the global configuration and the typoscript
* settings.
*
* @return array
* @throws ImmediateResponseException
*/
public function prepareConfiguration(): array {
$extensionConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['content_replacer'] ?? [];
......
<?php
namespace SGalinski\ContentReplacer\Repository;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services <https://www.sgalinski.de>
* (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 2 of the License, or
* 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
......@@ -25,9 +23,14 @@ namespace SGalinski\ContentReplacer\Repository;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
namespace SGalinski\ContentReplacer\Repository;
use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\Exception;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Context\Exception\AspectNotFoundException;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......@@ -41,9 +44,11 @@ class TermRepository {
* @param string $category
* @param array $storagePageIds
* @return array
* @throws \UnexpectedValueException
* @throws Exception
* @throws AspectNotFoundException
*/
public function fetchTerms(array $filterTerms, $category, array $storagePageIds) {
public function fetchTerms(array $filterTerms, string $category, array $storagePageIds): array {
$context = GeneralUtility::makeInstance(Context::class);
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable('tx_content_replacer_term');
$queryBuilder->select(
......@@ -62,10 +67,10 @@ class TermRepository {
'category',
'category.uid = term.category_uid'
)->where(
$queryBuilder->expr()->andX(
$queryBuilder->expr()->and(
$queryBuilder->expr()->in(
'term',
$queryBuilder->createNamedParameter($filterTerms, Connection::PARAM_STR_ARRAY)
$queryBuilder->createNamedParameter($filterTerms, ArrayParameterType::STRING)
),
$queryBuilder->expr()->in('term.sys_language_uid', [-1, 0]),
$queryBuilder->expr()->eq(
......@@ -78,27 +83,25 @@ class TermRepository {
$queryBuilder->andWhere(
$queryBuilder->expr()->in(
'term.pid',
$queryBuilder->createNamedParameter($storagePageIds, Connection::PARAM_INT_ARRAY)
$queryBuilder->createNamedParameter($storagePageIds, ArrayParameterType::INTEGER)
)
);
}
$results = $queryBuilder->execute()->fetchAll();
$results = $queryBuilder->executeQuery()->fetchAllAssociative();
$terms = [];
$typoScriptFrontendController = $GLOBALS['TSFE'];
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
$languageAspect = $context->getAspect('language');
$sysLanguageId = $languageAspect->getId();
$sysLanguageOverlay = $languageAspect->getOverlayType();
foreach ($results as $term) {
if ($sysLanguageId) {
if ($sysLanguageId > 0) {
// This bit of code is bad performancewise, we should consider fetching relevant records via
// one single db call instead of looping through found default language records and fetching overlays
// for each of these separately
$term = $typoScriptFrontendController->sys_page->getRecordOverlay(
$term = $pageRepository->getLanguageOverlay(
'tx_content_replacer_term',
$term,
$sysLanguageId,
$sysLanguageOverlay
$languageAspect
);
}
......
......@@ -3,13 +3,14 @@
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services <https://www.sgalinski.de>
* (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 2 of the License, or
* 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
......@@ -25,7 +26,9 @@
namespace SGalinski\ContentReplacer\Service;
use Doctrine\DBAL\Exception;
use SGalinski\ContentReplacer\Repository\TermRepository;
use TYPO3\CMS\Core\Context\Exception\AspectNotFoundException;
use TYPO3\CMS\Core\Http\ApplicationType;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager;
......@@ -40,19 +43,19 @@ abstract class AbstractParserService {
*
* @var array
*/
protected $extensionConfiguration = [];
protected array $extensionConfiguration = [];
/**
* lib.parseFunc_RTE configuration
*
* @var array
*/
protected $parseFunc = [];
protected array $parseFunc = [];
/**
* @var TermRepository
*/
protected $termRepository;
protected TermRepository $termRepository;
/**
* Constructor: Initializes the internal class properties.
......@@ -69,7 +72,7 @@ abstract class AbstractParserService {
* @param array $extensionConfiguration
* @return void
*/
public function setExtensionConfiguration(array $extensionConfiguration) {
public function setExtensionConfiguration(array $extensionConfiguration): void {
$this->extensionConfiguration = $extensionConfiguration;
}
......@@ -79,7 +82,7 @@ abstract class AbstractParserService {
* @param TermRepository $repository
* @return void
*/
public function injectTermRepository(TermRepository $repository) {
public function injectTermRepository(TermRepository $repository): void {
$this->termRepository = $repository;
}
......@@ -96,7 +99,7 @@ abstract class AbstractParserService {
* @param string $termName
* @return string
*/
protected function prepareReplacementTerm($replacement, $stdWrap, $termName) {
protected function prepareReplacementTerm(string $replacement, string $stdWrap, string $termName): string {
$cObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
if ($replacement !== '') {
......@@ -132,10 +135,11 @@ abstract class AbstractParserService {
*
* @param array $terms
* @param string $category
* @return string
* @throws \UnexpectedValueException
* @return array
* @throws Exception
* @throws AspectNotFoundException
*/
protected function prepareFoundTerms(array &$terms, string $category) {
protected function prepareFoundTerms(array &$terms, string $category): array {
$terms['*'] = [];
$termNames = array_keys($terms);
$storagePageIds = GeneralUtility::intExplode(',', $this->extensionConfiguration['storagePid'], TRUE);
......@@ -143,10 +147,7 @@ abstract class AbstractParserService {
$configuredTerms = $this->termRepository->fetchTerms($termNames, $category, $storagePageIds);
$terms = array_merge_recursive($terms, $configuredTerms);
$defaultReplacement = (is_array($terms['*']) ? $terms['*'] : '');
unset($terms['*']);
return $defaultReplacement;
return (is_array($terms['*']) ? $terms['*'] : []);
}
/**
......@@ -157,7 +158,7 @@ abstract class AbstractParserService {
* @param string $content
* @return array
*/
abstract public function parse($content);
abstract public function parse(string $content): array;
/**
* Replaces the given terms with their related replacement values.
......@@ -168,5 +169,5 @@ abstract class AbstractParserService {
* @param string $content
* @return string
*/
abstract public function replaceByCategory($category, array $terms, $content);
abstract public function replaceByCategory(string $category, array $terms, string $content): string;
}
<?php
namespace SGalinski\ContentReplacer\Service;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services <https://www.sgalinski.de>
* (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 2 of the License, or
* 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
......@@ -25,6 +23,11 @@ namespace SGalinski\ContentReplacer\Service;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
namespace SGalinski\ContentReplacer\Service;
use Doctrine\DBAL\Exception;
use TYPO3\CMS\Core\Context\Exception\AspectNotFoundException;
/**
* Substitution service that parses and replaces special span tags inside the code
*
......@@ -36,7 +39,7 @@ class CustomParserService extends AbstractParserService {
/**
* @var string
*/
protected $wrapCharacter = '';
protected string $wrapCharacter = '';
/**
* Sets the wrap character
......@@ -44,7 +47,7 @@ class CustomParserService extends AbstractParserService {
* @param string $wrapCharacter
* @return void
*/
public function setWrapCharacter($wrapCharacter) {
public function setWrapCharacter(string $wrapCharacter): void {
$this->wrapCharacter = $wrapCharacter;
}
......@@ -64,7 +67,7 @@ class CustomParserService extends AbstractParserService {
* @param string $content
* @return array
*/
public function parse($content) {
public function parse(string $content): array {
$matches = [];
$maximumLengthPattern = '+';
......@@ -94,9 +97,10 @@ class CustomParserService extends AbstractParserService {
* @param array $terms
* @param string $content
* @return string
* @throws \UnexpectedValueException
* @throws Exception
* @throws AspectNotFoundException
*/
public function replaceByCategory($category, array $terms, $content) {
public function replaceByCategory(string $category, array $terms, string $content): string {
$search = $replace = [];
$defaultReplacement = $this->prepareFoundTerms($terms, $category);
$char = preg_quote($this->wrapCharacter, '/');
......
......@@ -3,13 +3,14 @@
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services <https://www.sgalinski.de>
* (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 2 of the License, or
* 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
......@@ -25,6 +26,8 @@
namespace SGalinski\ContentReplacer\Service;
use Doctrine\DBAL\Exception;
use TYPO3\CMS\Core\Context\Exception\AspectNotFoundException;
use TYPO3\CMS\Core\Log\Logger;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -54,7 +57,7 @@ class SpanParserService extends AbstractParserService {
* @param string $content
* @return array
*/
public function parse($content): array {
public function parse(string $content): array {
$matches = [];
$prefix = (string) ($this->extensionConfiguration['prefix'] ?? '');
if (ExtensionManagementUtility::isLoaded('headless')) {
......@@ -90,7 +93,7 @@ class SpanParserService extends AbstractParserService {
foreach ($classes as $classIndex => $class) {
$class = trim($class);
if ($prefix !== '' && FALSE !== strpos($class, $prefix)) {
if ($prefix !== '' && str_contains($class, $prefix)) {
$category = str_replace($prefix, '', $class);
unset($classes[$classIndex]);
break;
......@@ -123,9 +126,10 @@ class SpanParserService extends AbstractParserService {
* @param array $terms
* @param string $content
* @return string
* @throws \UnexpectedValueException
* @throws Exception
* @throws AspectNotFoundException
*/
public function replaceByCategory($category, array $terms, $content): string {
public function replaceByCategory(string $category, array $terms, string $content): string {
$search = $replace = [];
$defaultReplacement = $this->prepareFoundTerms($terms, $category);
foreach ($terms as $termName => $term) {
......@@ -138,7 +142,7 @@ class SpanParserService extends AbstractParserService {
if (ExtensionManagementUtility::isLoaded('headless')) {
// when EXT:headless is present, content will be escaped (JSON output), so we got to add some small details:
$search[$termName] = '/' .
'<span ' . preg_quote($term['pre'], '/') .
'<span ' . preg_quote($term['pre'] ?? '', '/') .
'class=\\\\"([^"]*?)' . $searchClass . '([^"]*?)\\\\"' .
preg_quote($term['post'], '/') . '>' .
'\s*?' . preg_quote($term['term'], '/') . '\s*?' .
......@@ -146,10 +150,10 @@ class SpanParserService extends AbstractParserService {
'/i';
} else {
$search[$termName] = '/' .
'<span ' . preg_quote($term['pre'], '/') .
'<span ' . preg_quote($term['pre'] ?? '', '/') .
'class="([^"]*?)' . $searchClass . '([^"]*?)"' .
preg_quote($term['post'], '/') . '>' .
'\s*?' . preg_quote($term['term'], '/') . '\s*?' .
preg_quote($term['post'] ?? '', '/') . '>' .
'\s*?' . preg_quote($term['term'] ?? '', '/') . '\s*?' .
'<\/span>' .
'/i';
}
......@@ -160,7 +164,7 @@ class SpanParserService extends AbstractParserService {
$termName
);
if (trim($term['pre']) !== '' || trim($term['post']) !== '' || trim($term['classAttribute']) !== '') {
if (trim($term['pre'] ?? '') !== '' || trim($term['post'] ?? '') !== '' || trim($term['classAttribute'] ?? '') !== '') {
$attributes = trim($term['pre'] . ' ' . $term['post'] . ' ' . $term['classAttribute']);
$replace[$termName] = '<span ' . $attributes . '>' . $replace[$termName] . '</span>';
}
......
<?php
/**
*
* 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!
*/
use SGalinski\ContentReplacer\Middleware\ContentReplacerMiddleware;
return [
'frontend' => [
'sgalinski/content-replacer' => [
'target' => \SGalinski\ContentReplacer\Middleware\ContentReplacerMiddleware::class,
'target' => ContentReplacerMiddleware::class,
'description' => '',
'before' => [
'typo3/cms-frontend/content-length-headers'
......
<?php
/***************************************************************
* 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 2 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!
***************************************************************/
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
......
<?php
defined('TYPO3') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
ExtensionManagementUtility::addStaticFile(
'content_replacer',
'Configuration/Typoscript/',
'Content Replacer'
......
<?php
defined('TYPO3') or die();
/**
*
* 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!
*/
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tx_content_replacer_category');
ExtensionManagementUtility::addToInsertRecords(
'tx_content_replacer_category'
);
<?php
defined('TYPO3') or die();
/**
*
* 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!
*/
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tx_content_replacer_term');
ExtensionManagementUtility::addToInsertRecords(
'tx_content_replacer_term'
);
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
// Path to the localisation file
$localisationFilePath = 'LLL:EXT:content_replacer/Resources/Private/Language/locallang_db.xlf:';
$generalLabelsPrefix = 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.';
/** @var array using TCA Notation */
$columns = [
'ctrl' => [
'title' => $localisationFilePath . 'tx_content_replacer_category',
'label' => 'category',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'versioningWS' => TRUE,
'origUid' => 't3_origuid',
'default_sortby' => 'ORDER BY category',
......@@ -24,6 +18,9 @@ $columns = [
'enablecolumns' => [
'disabled' => 'hidden'
],
'security' => [
'ignorePageTypeRestriction' => 1
],
'searchFields' => 'category, description',
'iconfile' => 'EXT:content_replacer/Resources/Public/Icons/icon_tx_content_replacer_category.png',
],
......@@ -53,8 +50,8 @@ $columns = [
'config' => [
'type' => 'input',
'size' => 40,
'max' => 256,
'eval' => 'trim,required,unique',
'eval' => 'trim,unique',
'required' => TRUE,
],
],
'description' => [
......
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
// Path to the localisation file
$localisationFilePath = 'LLL:EXT:content_replacer/Resources/Private/Language/locallang_db.xlf:';
$generalLabelsPrefix = 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.';
/** @var array using TCA Notation */
$columns = [
'ctrl' => [
'title' => $localisationFilePath . 'tx_content_replacer_term',
......@@ -20,7 +15,6 @@ $columns = [
'transOrigDiffSourceField' => 'l10n_diffsource',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'versioningWS' => TRUE,
'origUid' => 't3_origuid',
'groupName' => 'content_replacer',
......@@ -31,6 +25,9 @@ $columns = [
'starttime' => 'starttime',
'endtime' => 'endtime'
],
'security' => [
'ignorePageTypeRestriction' => 1
],
'searchFields' => 'term, replacement, description',
'iconfile' => 'EXT:content_replacer/Resources/Public/Icons/icon_tx_content_replacer_term.png',
],
......@@ -44,19 +41,7 @@ $columns = [
'sys_language_uid' => [
'exclude' => TRUE,
'label' => $generalLabelsPrefix . 'language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'languages',
'default' => 0,
'items' => [
[
$generalLabelsPrefix . 'allLanguages',
-1,
'flags-multiple'
]
]
],
'config' => ['type' => 'language'],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
......@@ -65,7 +50,7 @@ $columns = [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0],
['label' => '', 'value' => 0],
],
'foreign_table' => 'tx_content_replacer_term',
'foreign_table_where' => 'AND tx_content_replacer_term.pid=###CURRENT_PID### ' .
......@@ -89,9 +74,7 @@ $columns = [
'exclude' => TRUE,
'label' => $generalLabelsPrefix . 'starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'type' => 'datetime',
'default' => 0
]
],
......@@ -99,9 +82,7 @@ $columns = [
'exclude' => TRUE,
'label' => $generalLabelsPrefix . 'endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'type' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
......@@ -114,8 +95,8 @@ $columns = [
'config' => [
'type' => 'input',
'size' => 40,
'max' => 256,
'eval' => 'trim,required',
'eval' => 'trim',
'required' => TRUE,
]
],
'category_uid' => [
......@@ -144,7 +125,6 @@ $columns = [
'config' => [
'type' => 'input',
'size' => 40,
'max' => 256,
'eval' => 'trim',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
......
# Version 8 Breaking Changes
- Dropped TYPO3 10 and 11 support
- Dropped php 7 support
# Version 7 Breaking Changes
- Dropped TYPO3 9 support
......
......@@ -9,9 +9,9 @@
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/content_replacer/issues"
},
"version": "7.0.11",
"version": "8.0.0-dev",
"require": {
"typo3/cms-core": "^10.4 || ^11.5"
"typo3/cms-core": "^12.4"
},
"replace": {
"sgalinski/content_replacer": "self.version"
......
......@@ -14,15 +14,15 @@ $EM_CONF['content_replacer'] = [
'title' => 'Content Replacer',
'description' => 'You need a fast substitution of terms with full support of typoscript, categories and RTE integration? If yes, the extension could be perfectly fit into your project. The performance is gained by wrapping of the replacement terms to simplify the parsing process.',
'category' => 'fe',
'version' => '7.0.11',
'version' => '8.0.0-dev',
'state' => 'stable',
'author' => 'Stefan Galinski',
'author_email' => 'stefan.galinski@gmail.com',
'author_company' => 'domainFACTORY',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-11.5.99',
'php' => '7.4.0-8.1.99',
'typo3' => '12.4.0-12.4.99',
'php' => '8.1.0-8.3.99',
],
'conflicts' => [
],
......
<?php
defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_content_replacer_category');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_content_replacer_term');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment