• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CPS-IT / handlebars-forms / 22340200704

24 Feb 2026 07:00AM UTC coverage: 0.0%. Remained the same
22340200704

push

github

eliashaeussler
[TASK] Improve namings and extract RENDERABLES to its own value processor

0 of 129 new or added lines in 18 files covered. (0.0%)

3 existing lines in 2 files now uncovered.

0 of 458 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Classes/DataProcessing/Renderable/AbstractRenderableProcessor.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the TYPO3 CMS extension "handlebars_forms".
7
 *
8
 * It is free software; you can redistribute it and/or modify it under
9
 * the terms of the GNU General Public License, either version 2
10
 * of the License, or any later version.
11
 *
12
 * For the full copyright and license information, please read the
13
 * LICENSE.txt file that was distributed with this source code.
14
 *
15
 * The TYPO3 project - inspiring people to share!
16
 */
17

18
namespace CPSIT\Typo3HandlebarsForms\DataProcessing\Renderable;
19

20
use CPSIT\Typo3HandlebarsForms\Fluid\ViewHelperInvoker;
21
use TYPO3\CMS\Fluid;
22
use TYPO3\CMS\Form;
23

24
/**
25
 * AbstractRenderableProcessor
26
 *
27
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
28
 * @license GPL-2.0-or-later
29
 *
30
 * @template T of Form\Domain\Model\Renderable\RootRenderableInterface
31
 * @implements RenderableProcessor<T>
32
 */
33
abstract class AbstractRenderableProcessor implements RenderableProcessor
34
{
35
    /**
36
     * @var list<non-empty-string>
37
     */
38
    protected array $supportedTypes = [];
39

40
    public function __construct(
×
41
        protected readonly ViewHelperInvoker $viewHelperInvoker,
42
    ) {}
×
43

44
    public function supports(Form\Domain\Model\Renderable\RootRenderableInterface $renderable): bool
×
45
    {
46
        return in_array($renderable->getType(), $this->supportedTypes, true);
×
47
    }
48

49
    /**
50
     * @param T $renderable
51
     * @return array<string, mixed>
52
     */
53
    protected function renderAdditionalAttributes(
×
54
        Fluid\Core\Rendering\RenderingContext $renderingContext,
55
        Form\Domain\Model\Renderable\RootRenderableInterface $renderable,
56
    ): array {
NEW
57
        $content = $this->translateElementProperty(
×
NEW
58
            $renderingContext,
×
NEW
59
            $renderable,
×
NEW
60
            'fluidAdditionalAttributes',
×
NEW
61
        );
×
62

NEW
63
        if (!is_array($content)) {
×
NEW
64
            return [];
×
65
        }
66

NEW
67
        return $content;
×
68
    }
69

NEW
70
    protected function translateElementProperty(
×
71
        Fluid\Core\Rendering\RenderingContext $renderingContext,
72
        Form\Domain\Model\Renderable\RootRenderableInterface $renderable,
73
        string $property,
74
    ): mixed {
75
        $result = $this->viewHelperInvoker->invoke(
×
76
            $renderingContext,
×
77
            Form\ViewHelpers\TranslateElementPropertyViewHelper::class,
×
78
            [
×
79
                'element' => $renderable,
×
NEW
80
                'property' => $property,
×
81
            ],
×
82
        );
×
83

84
        return $result->content;
×
85
    }
86
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc