• 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

87.5
/Classes/Controller/HandlebarsController.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\Controller;
19

20
use CPSIT\Typo3Handlebars\Exception;
21
use CPSIT\Typo3Handlebars\View\HandlebarsView;
22
use Symfony\Component\DependencyInjection;
23
use TYPO3\CMS\Extbase;
24

25
/**
26
 * HandlebarsController
27
 *
28
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
29
 * @license GPL-2.0-or-later
30
 */
31
#[DependencyInjection\Attribute\AutoconfigureTag('handlebars.extbase_controller')]
32
abstract class HandlebarsController extends Extbase\Mvc\Controller\ActionController
33
{
34
    /**
35
     * @throws Exception\ViewIsNotSupported
36
     */
37
    protected function renderView(?string $templateName = null): string
2✔
38
    {
39
        if (!($this->view instanceof HandlebarsView)) {
2✔
NEW
40
            throw new Exception\ViewIsNotSupported($this->view);
×
41
        }
42

43
        if ($templateName !== null) {
2✔
44
            $view = clone $this->view;
1✔
45
            $view->setTemplateName($templateName);
1✔
46
        } else {
47
            $view = $this->view;
1✔
48
        }
49

50
        return $view->render();
2✔
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