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

CPS-IT / handlebars-forms / 24498199872

16 Apr 2026 07:39AM UTC coverage: 0.556% (-0.006%) from 0.562%
24498199872

push

github

eliashaeussler
[FEATURE] Allow passing custom variables from HBS_PASSTHROUGH to partial

0 of 5 new or added lines in 2 files covered. (0.0%)

19 existing lines in 2 files now uncovered.

7 of 1258 relevant lines covered (0.56%)

0.02 hits per line

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

0.0
/Classes/ContentObject/PassthroughContentObject.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 DevTheorem\Handlebars;
22
use Symfony\Component\DependencyInjection;
23
use TYPO3\CMS\Core;
24

25
/**
26
 * PassthroughContentObject
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_PASSTHROUGH'])]
32
final class PassthroughContentObject extends AbstractHandlebarsFormsContentObject
33
{
34
    public function __construct(
×
35
        private readonly Domain\Renderer\FluidRenderableRenderer $fluidRenderer,
36
        private readonly Core\TypoScript\TypoScriptService $typoScriptService,
UNCOV
37
    ) {}
×
38

39
    protected function resolve(array $configuration, Context\ValueResolutionContext $context): Handlebars\SafeString
×
40
    {
NEW
41
        if ($configuration !== []) {
×
42
            /** @var array<string, mixed> $variables */
NEW
43
            $variables = $this->typoScriptService->convertTypoScriptArrayToPlainArray($configuration);
×
44
        } else {
NEW
45
            $variables = [];
×
46
        }
47

NEW
48
        $renderedPartial = $this->fluidRenderer->render($context->renderable, $context->formRuntime, $variables);
×
49

50
        return new Handlebars\SafeString($renderedPartial);
×
51
    }
52
}
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