Implement filterable offer list
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user