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

CPS-IT / handlebars-forms / 23136611556

16 Mar 2026 09:24AM UTC coverage: 0.0%. Remained the same
23136611556

Pull #11

github

web-flow
Merge 9d646c36d into 478f0059f
Pull Request #11: [FEATURE] Introduce `EACH_RENDERABLE` and `PROPERTY` for validation results

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

2 existing lines in 1 file now uncovered.

0 of 732 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/Context/ValueResolutionContext.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\Context;
19

20
use CPSIT\Typo3HandlebarsForms\Domain;
21
use TYPO3\CMS\Form;
22

23
/**
24
 * ValueResolutionContext
25
 *
26
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
27
 * @license GPL-2.0-or-later
28
 *
29
 * @phpstan-type ProcessorClosure \Closure(
30
 *     array<string, mixed>,
31
 *     Form\Domain\Model\Renderable\RootRenderableInterface|null,
32
 *     Domain\Renderable\ViewModel\ViewModel|null,
33
 * ): mixed
34
 */
35
final readonly class ValueResolutionContext
36
{
37
    /**
38
     * @param ProcessorClosure|null $renderableProcessor
39
     */
40
    public function __construct(
×
41
        public Form\Domain\Model\Renderable\RootRenderableInterface $renderable,
42
        public Domain\Renderable\ViewModel\ViewModel $viewModel,
43
        private ?\Closure $renderableProcessor = null,
44
    ) {}
×
45

46
    /**
47
     * @param array<string, mixed> $configuration
48
     */
49
    public function process(
×
50
        array $configuration = [],
51
        ?Form\Domain\Model\Renderable\RootRenderableInterface $renderable = null,
52
        ?Domain\Renderable\ViewModel\ViewModel $viewModel = null,
53
    ): mixed {
54
        if ($this->renderableProcessor === null) {
×
55
            return null;
×
56
        }
57

58
        return ($this->renderableProcessor)($configuration, $renderable, $viewModel);
×
59
    }
60

NEW
61
    public function withRenderable(Form\Domain\Model\Renderable\RootRenderableInterface $renderable): self
×
62
    {
NEW
63
        return new self($renderable, $this->viewModel, $this->renderableProcessor);
×
64
    }
65

NEW
66
    public function withViewModel(Domain\Renderable\ViewModel\ViewModel $viewModel): self
×
67
    {
NEW
68
        return new self($this->renderable, $viewModel, $this->renderableProcessor);
×
69
    }
70
}
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