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

CPS-IT / handlebars-forms / 23132770286

16 Mar 2026 07:34AM UTC coverage: 0.0%. Remained the same
23132770286

Pull #10

github

web-flow
Merge c6350c8ec into fdb00737e
Pull Request #10: [FEATURE] Convert value resolvers to context-aware content objects

0 of 88 new or added lines in 11 files covered. (0.0%)

2 existing lines in 1 file now uncovered.

0 of 696 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/ContentObject/TranslatePropertyContentObject.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\Fluid;
21
use Symfony\Component\DependencyInjection;
22

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

NEW
36
    protected function resolve(array $configuration, Context\ValueResolutionContext $context): mixed
×
37
    {
NEW
38
        $property = $configuration['property'] ?? null;
×
NEW
39
        $argumentName = $configuration['argumentName'] ?? null;
×
40

41
        if (!is_string($property)) {
×
42
            return null;
×
43
        }
44

45
        if (!in_array($argumentName, ['property', 'renderingOptionProperty'], true)) {
×
46
            $argumentName = 'property';
×
47
        }
48

49
        return $this->viewHelperInvoker->translateElementProperty(
×
NEW
50
            $context->viewModel->renderingContext,
×
NEW
51
            $context->renderable,
×
52
            $property,
×
53
            $argumentName,
×
54
        );
×
55
    }
56
}
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