Implement filterable offer list

This commit is contained in:
Björn Fromme
2019-07-16 17:35:35 +02:00
parent b3234be447
commit ad64228692
22 changed files with 861 additions and 176 deletions
@@ -27,6 +27,7 @@ namespace EP\EpEvents\ViewHelpers;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use EP\EpEvents\Service\SectionCssClassService;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
@@ -35,16 +36,6 @@ class SectionCssClassViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @var array
*/
protected static $cssClasses = [
1 => 'incentives',
2 => 'teambuilding',
3 => 'meetings',
4 => 'events',
];
public function initializeArguments()
{
parent::initializeArguments();
@@ -68,11 +59,8 @@ class SectionCssClassViewHelper extends AbstractViewHelper
if ($sectionValue === null) {
$sectionValue = $arguments['sectionValue'];
}
if (array_key_exists($sectionValue, static::$cssClasses)) {
return 'section-' . static::$cssClasses[$sectionValue];
}
return 'section-default';
return SectionCssClassService::getClass($sectionValue);
}
}
@@ -27,6 +27,7 @@ namespace EP\EpEvents\ViewHelpers;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use EP\EpEvents\Service\SoftHyphenService;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
@@ -64,7 +65,7 @@ class SoftHyphenViewHelper extends AbstractViewHelper
$string = $arguments['string'];
}
return str_replace('--', '­', $string);
return SoftHyphenService::replace($string);
}
}