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

CPS-IT / handlebars-forms / 23791207011

31 Mar 2026 09:49AM UTC coverage: 0.62% (-0.03%) from 0.654%
23791207011

Pull #19

github

web-flow
Merge 743614d6b into bd42335b8
Pull Request #19: [FEATURE] Support proper rendering of `SummaryPage` renderables

0 of 63 new or added lines in 4 files covered. (0.0%)

1 existing line in 1 file now uncovered.

7 of 1129 relevant lines covered (0.62%)

0.02 hits per line

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

0.0
/Classes/ContentObject/FormValueContentObject.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\ContentObject;
19

20
use CPSIT\Typo3HandlebarsForms\Domain;
21
use CPSIT\Typo3HandlebarsForms\Fluid;
22
use Symfony\Component\DependencyInjection;
23
use TYPO3\CMS\Form;
24

25
/**
26
 * FormValueContentObject
27
 *
28
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
29
 * @license GPL-2.0-or-later
30
 */
31
#[DependencyInjection\Attribute\AutoconfigureTag('frontend.contentobject', ['identifier' => 'HBS_FORM_VALUE'])]
32
final class FormValueContentObject extends AbstractHandlebarsFormsContentObject
33
{
NEW
34
    public function __construct(
×
35
        private readonly Fluid\ViewHelperInvoker $viewHelperInvoker,
NEW
36
    ) {}
×
37

NEW
38
    protected function resolve(array $configuration, Context\ValueResolutionContext $context): mixed
×
39
    {
NEW
40
        $formValueVariableName = 'formValue';
×
NEW
41
        $result = $this->viewHelperInvoker->invoke(
×
NEW
42
            $context->renderingContext,
×
NEW
43
            Form\ViewHelpers\RenderFormValueViewHelper::class,
×
NEW
44
            [
×
NEW
45
                'renderable' => $context->renderable,
×
NEW
46
                'as' => $formValueVariableName,
×
NEW
47
            ],
×
NEW
48
            function () use ($configuration, $context, $formValueVariableName) {
×
NEW
49
                $formValueContext = $context->renderingContext->getVariableProvider()->get($formValueVariableName);
×
50

NEW
51
                if (!is_array($formValueContext)) {
×
NEW
52
                    return null;
×
53
                }
54

55
                /** @var array<string, mixed> $formValueContext */
NEW
56
                $formValueViewModel = Domain\ViewModel\FormValueViewModel::fromArray($formValueContext);
×
57

NEW
58
                if ($configuration === []) {
×
NEW
59
                    return $formValueViewModel->processedValue;
×
60
                }
61

NEW
62
                return $context->process($configuration, viewModel: $formValueViewModel);
×
NEW
63
            },
×
NEW
64
        );
×
65

NEW
66
        return $result->content;
×
67
    }
68
}
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