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

CPS-IT / handlebars-forms / 22348474583

24 Feb 2026 11:16AM UTC coverage: 0.0%. Remained the same
22348474583

push

github

eliashaeussler
[TASK] Wrap renderable VH invocations with `formvh:renderRenderable` VH

0 of 23 new or added lines in 9 files covered. (0.0%)

1 existing line in 1 file now uncovered.

0 of 499 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/Domain/Renderable/ViewModel/SelectViewModelBuilder.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\Domain\Renderable\ViewModel;
19

20
use TYPO3\CMS\Fluid;
21
use TYPO3\CMS\Form;
22

23
/**
24
 * SelectViewModelBuilder
25
 *
26
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
27
 * @license GPL-2.0-or-later
28
 *
29
 * @extends AbstractViewModelBuilder<Form\Domain\Model\FormElements\FormElementInterface>
30
 */
31
final class SelectViewModelBuilder extends AbstractViewModelBuilder
32
{
33
    protected array $supportedTypes = [
34
        'MultiSelect',
35
        'SingleSelect',
36
    ];
37

NEW
38
    public function renderRenderable(
×
39
        Form\Domain\Model\Renderable\RootRenderableInterface $renderable,
40
        Fluid\Core\Rendering\RenderingContext $renderingContext,
41
    ): ViewModel {
42
        $additionalAttributes = $this->renderAdditionalAttributes($renderingContext, $renderable);
×
43
        $result = $this->viewHelperInvoker->invoke(
×
44
            $renderingContext,
×
45
            Fluid\ViewHelpers\Form\SelectViewHelper::class,
×
46
            [
×
47
                'property' => $renderable->getIdentifier(),
×
48
                'id' => $renderable->getUniqueIdentifier(),
×
49
                'class' => $renderable->getProperties()['elementClassAttribute'] ?? null,
×
50
                'options' => $this->translateElementProperty($renderingContext, $renderable, 'options'),
×
51
                'multiple' => $renderable->getType() === 'MultiSelect' ? 'multiple' : null,
×
52
                'errorClass' => $renderable->getProperties()['elementErrorClassAttribute'] ?? null,
×
53
                'additionalAttributes' => $additionalAttributes,
×
54
                'prependOptionLabel' => $this->translateElementProperty($renderingContext, $renderable, 'prependOptionLabel'),
×
55
                'prependOptionValue' => $this->translateElementProperty($renderingContext, $renderable, 'prependOptionValue'),
×
56
            ],
×
57
        );
×
58

59
        foreach ($additionalAttributes as $name => $value) {
×
60
            $result->tag->addAttribute($name, $value);
×
61
        }
62

63
        return new ViewModel($renderingContext, $result->content, $result->tag);
×
64
    }
65
}
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