[TASK] Updates for TYPO3 11

This commit is contained in:
Philipp Dieter
2023-09-26 16:19:53 +02:00
parent e126e674c7
commit a02b1bb939
27 changed files with 258 additions and 287 deletions

View File

@@ -60,10 +60,6 @@ class WordWrapViewHelper extends AbstractViewHelper
continue;
}
$temp = '';
//while (mb_strlen($line) > $limit) {
// $temp .= mb_substr($line, 0, $limit - 1);
// $line = mb_substr($line, $limit - 1);
//}
if (false === empty($temp)) {
$output .= $temp . $glue . $line . $glue;
} else {

View File

@@ -1,7 +1,8 @@
<?php
namespace Cjel\TemplatesAide\ViewHelpers;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class HeaderDataViewHelper extends AbstractViewHelper
@@ -25,12 +26,7 @@ class HeaderDataViewHelper extends AbstractViewHelper
}
switch ($type){
case 'tracking':
//if(GeneralUtility::getApplicationContext()->isProduction()){
$GLOBALS['TSFE']->additionalHeaderData[] = $data;
//} else {
// $GLOBALS['TSFE']->additionalHeaderData[]
// = '<meta name="placeholder" content="tracking" />';
//}
break;
case 'title':
$GLOBALS['TSFE']->additionalHeaderData[]

View File

@@ -60,14 +60,10 @@ class ImageAppendViewHelper extends AbstractTagBasedViewHelper
{
foreach ($this->arguments['images'] as $image) {
$imagePath = $image->getForLocalProcessing(false);
//$image = $this->imageService->getImage('', $imageArgument, true);
//$image = $this->imageService->getImageUri($image);
$imageMagickFile = ImageMagickFile::fromFilePath($imagePath, 0);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
$imageMagickFile, null, 3
);
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
// $imageMagickFile, null, 3
// );

View File

@@ -4,7 +4,8 @@ namespace Cjel\TemplatesAide\ViewHelpers;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
@@ -21,10 +22,6 @@ class ScriptswitchNoscriptViewHelper extends AbstractViewHelper {
public function render()
{
//\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(
// $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate')
//);
$scriptstate = $GLOBALS['TSFE']->fe_user->getKey('ses', 'scriptstate');
if ($scriptstate) {

View File

@@ -46,7 +46,7 @@ class TranslationViewHelper extends AbstractViewHelper
'array',
'The arguments',
false,
false
[]
);
}
@@ -63,6 +63,8 @@ class TranslationViewHelper extends AbstractViewHelper
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
) {
$translation = LocalizationUtility::translate(
$arguments['key'],
$arguments['extensionKey'],