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

CPS-IT / handlebars / 22660183928

04 Mar 2026 07:53AM UTC coverage: 90.285% (-8.8%) from 99.094%
22660183928

push

github

eliashaeussler
Merge branch '1.x'

1277 of 1418 new or added lines in 66 files covered. (90.06%)

2 existing lines in 1 file now uncovered.

1329 of 1472 relevant lines covered (90.29%)

6.92 hits per line

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

77.78
/Classes/Renderer/Template/Path/TypoScriptPathProvider.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the TYPO3 CMS extension "handlebars".
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\Typo3Handlebars\Renderer\Template\Path;
19

20
use CPSIT\Typo3Handlebars\Configuration;
21
use TYPO3\CMS\Extbase;
22

23
/**
24
 * TypoScriptPathProvider
25
 *
26
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
27
 * @license GPL-2.0-or-later
28
 */
29
final class TypoScriptPathProvider implements PathProvider
30
{
31
    /**
32
     * @var array<string, mixed>|null
33
     */
34
    private ?array $viewConfiguration = null;
35

36
    public function __construct(
2✔
37
        private readonly Extbase\Configuration\ConfigurationManagerInterface $configurationManager,
38
    ) {}
2✔
39

40
    public function getPartialRootPaths(): array
1✔
41
    {
42
        return $this->getViewConfiguration()[self::PARTIALS] ?? [];
1✔
43
    }
44

45
    public function getTemplateRootPaths(): array
1✔
46
    {
47
        return $this->getViewConfiguration()[self::TEMPLATES] ?? [];
1✔
48
    }
49

NEW
50
    public function isCacheable(): bool
×
51
    {
NEW
52
        return true;
×
53
    }
54

55
    /**
56
     * @return array{partialRootPaths?: array<int, string>, templateRootPaths?: array<int, string>}
57
     */
58
    private function getViewConfiguration(): array
2✔
59
    {
60
        if ($this->viewConfiguration === null) {
2✔
61
            $typoScriptConfiguration = $this->configurationManager->getConfiguration(
2✔
62
                Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK,
2✔
63
                Configuration\Extension::NAME,
2✔
64
            );
2✔
65
            $this->viewConfiguration = $typoScriptConfiguration['view'] ?? [];
2✔
66
        }
67

68
        return $this->viewConfiguration;
2✔
69
    }
70

NEW
71
    public static function getPriority(): int
×
72
    {
NEW
73
        return 50;
×
74
    }
75
}
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