Upgrade to TYPO3 9.5 LTS

This commit is contained in:
Björn Fromme
2019-06-06 17:20:29 +02:00
parent adab7fb39a
commit 3c472eb973
989 changed files with 4924 additions and 3674 deletions
@@ -0,0 +1,74 @@
<?php
namespace EP\EpEvents\ViewHelpers;
/***************************************************************
*
* Copyright notice
*
* (c) 2017 Björn Fromme <[email protected]>, dreipunktnull
* Cedric Ziel <[email protected]>, dreipunktnull
*
* 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\GeneralUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class ConfiguratorTypeLabelsViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('type', 'string', 'The type', true);
$this->registerArgument('config', 'array', 'The config', true);
$this->registerArgument('values', 'string', 'The labels', true);
}
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
)
{
if (empty($arguments['values'])) {
return 'Keine Angabe';
}
$types = [];
$indexes = GeneralUtility::trimExplode(',', $arguments['values']);
$type = $arguments['type'];
$config = $arguments['config'];
foreach ($indexes as $index)
{
$types[] = $config[$type][$index];
}
return implode(', ', $types);
}
}
@@ -0,0 +1,78 @@
<?php
namespace EP\EpEvents\ViewHelpers;
/***************************************************************
*
* Copyright notice
*
* (c) 2018 Björn Fromme <[email protected]>, dreipunktnull
* Cedric Ziel <[email protected]>, dreipunktnull
*
* 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class SectionCssClassViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @var array
*/
protected static $cssClasses = [
1 => 'incentives',
2 => 'teambuilding',
3 => 'meetings',
4 => 'events',
];
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('sectionValue', 'string', 'The section value');
}
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
)
{
$sectionValue = $renderChildrenClosure();
if ($sectionValue === null) {
$sectionValue = $arguments['sectionValue'];
}
if (array_key_exists($sectionValue, static::$cssClasses)) {
return 'section-' . static::$cssClasses[$sectionValue];
}
return 'section-default';
}
}
@@ -0,0 +1,85 @@
<?php
namespace EP\EpEvents\ViewHelpers;
/***************************************************************
*
* Copyright notice
*
* (c) 2018 Björn Fromme <[email protected]>, dreipunktnull
* Cedric Ziel <[email protected]>, dreipunktnull
*
* 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class SectionIconViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @var array
*/
protected static $icons = [
1 => 'icon_incentives',
2 => 'icon_teambuilding',
3 => 'icon_meetings',
4 => 'icon_events',
];
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('sectionValue', 'string', 'The section value');
$this->registerArgument('opaque', 'bool', 'Whether to use opaque icon', false, false);
}
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
)
{
$sectionValue = $renderChildrenClosure();
if ($sectionValue === null) {
$sectionValue = $arguments['sectionValue'];
}
$icon = '';
if (array_key_exists($sectionValue, static::$icons)) {
$icon = static::$icons[$sectionValue];
if ($arguments['opaque']) {
$icon .= '_opaque';
}
$icon .= '.svg';
}
return $icon;
}
}
@@ -0,0 +1,70 @@
<?php
namespace EP\EpEvents\ViewHelpers;
/***************************************************************
*
* Copyright notice
*
* (c) 2018 Björn Fromme <[email protected]>, dreipunktnull
* Cedric Ziel <[email protected]>, dreipunktnull
*
* 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class SoftHyphenViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @var bool
*/
protected $escapeOutput = false;
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('string', 'string', 'The string to process');
}
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return mixed
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
)
{
$string = $renderChildrenClosure();
if ($string === null) {
$string = $arguments['string'];
}
return str_replace('--', '&shy;', $string);
}
}