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

CPS-IT / handlebars-forms / 22666993507

04 Mar 2026 11:15AM UTC coverage: 0.0%. Remained the same
22666993507

push

github

eliashaeussler
[FEATURE] Provide `TRANSLATE_PROPERTY` value resolver

0 of 17 new or added lines in 1 file covered. (0.0%)

35 existing lines in 3 files now uncovered.

0 of 642 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/Fluid/ViewHelperInvoker.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\Fluid;
19

20
use TYPO3\CMS\Fluid;
21
use TYPO3\CMS\Form;
22
use TYPO3Fluid\Fluid as FluidStandalone;
23

24
/**
25
 * ViewHelperInvoker
26
 *
27
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
28
 * @license GPL-2.0-or-later
29
 */
30
final readonly class ViewHelperInvoker
31
{
32
    /**
33
     * @param array<string, mixed> $arguments
34
     * @param (\Closure(FluidStandalone\Core\ViewHelper\TagBuilder): mixed)|null $closure
35
     */
UNCOV
36
    public function invoke(
×
37
        Fluid\Core\Rendering\RenderingContext $renderingContext,
38
        string $viewHelperClassName,
39
        array $arguments = [],
40
        ?\Closure $closure = null,
41
    ): ViewHelperInvocationResult {
42
        $tag = new FluidStandalone\Core\ViewHelper\TagBuilder();
×
UNCOV
43
        $viewHelper = $renderingContext->getViewHelperResolver()->createViewHelperInstanceFromClassName($viewHelperClassName);
×
44

45
        if ($viewHelper instanceof FluidStandalone\Core\ViewHelper\AbstractTagBasedViewHelper) {
×
UNCOV
46
            $viewHelper->setTagBuilder($tag);
×
47
        }
48

49
        $content = $renderingContext->getViewHelperInvoker()->invoke(
×
50
            $viewHelper,
×
51
            $arguments,
×
52
            $renderingContext,
×
53
            static fn() => $closure ? $closure($tag) : '',
×
UNCOV
54
        );
×
55

UNCOV
56
        return new ViewHelperInvocationResult($viewHelper, $renderingContext, $content, $tag);
×
57
    }
58

59
    /**
60
     * @param 'property'|'renderingOptionProperty' $propertyArgumentName
61
     */
UNCOV
62
    public function translateElementProperty(
×
63
        Fluid\Core\Rendering\RenderingContext $renderingContext,
64
        Form\Domain\Model\Renderable\RootRenderableInterface $renderable,
65
        string $property,
66
        string $propertyArgumentName = 'property',
67
    ): mixed {
UNCOV
68
        $result = $this->invoke(
×
UNCOV
69
            $renderingContext,
×
UNCOV
70
            Form\ViewHelpers\TranslateElementPropertyViewHelper::class,
×
UNCOV
71
            [
×
UNCOV
72
                'element' => $renderable,
×
UNCOV
73
                $propertyArgumentName => $property,
×
UNCOV
74
            ],
×
UNCOV
75
        );
×
76

UNCOV
77
        return $result->content;
×
78
    }
79
}
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