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

FluidTYPO3 / vhs / 28587143939

02 Jul 2026 11:39AM UTC coverage: 69.743%. Remained the same
28587143939

push

github

NamelessCoder
[TASK] Fix an outdated error message

0 of 1 new or added line in 1 file covered. (0.0%)

4829 of 6924 relevant lines covered (69.74%)

4.32 hits per line

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

41.67
/Classes/ViewHelpers/Extension/AbstractExtensionViewHelper.php
1
<?php
2
namespace FluidTYPO3\Vhs\ViewHelpers\Extension;
3

4
/*
5
 * This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
6
 *
7
 * For the full copyright and license information, please read the
8
 * LICENSE.md file that was distributed with this source code.
9
 */
10

11
use FluidTYPO3\Vhs\Core\ViewHelper\AbstractViewHelper;
12
use FluidTYPO3\Vhs\Utility\RequestResolver;
13
use TYPO3\CMS\Core\Utility\GeneralUtility;
14
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
15
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
16

17
/**
18
 * Base class: Extension ViewHelpers
19
 */
20
abstract class AbstractExtensionViewHelper extends AbstractViewHelper
21
{
22
    /**
23
     * @var boolean
24
     */
25
    protected $escapeOutput = false;
26

27
    public function initializeArguments(): void
28
    {
29
        $this->registerArgument('extensionName', 'string', 'Name, in UpperCamelCase, of the extension to be checked');
10✔
30
    }
31

32
    protected static function getExtensionKey(array $arguments, RenderingContextInterface $renderingContext): string
33
    {
34
        /** @var string $extensionName */
35
        $extensionName = static::getExtensionName($arguments, $renderingContext);
10✔
36
        return GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName);
10✔
37
    }
38

39
    /**
40
     * @return mixed
41
     */
42
    protected static function getExtensionName(array $arguments, RenderingContextInterface $renderingContext)
43
    {
44
        /** @var RenderingContext $renderingContext */
45
        if (isset($arguments['extensionName']) && !empty($arguments['extensionName'])) {
10✔
46
            return $arguments['extensionName'];
10✔
47
        }
48
        $extensionName = RequestResolver::resolveControllerExtensionNameFromRenderingContext($renderingContext);
×
49
        if (empty($extensionName)) {
×
50
            throw new \RuntimeException(
×
NEW
51
                'Unable to read extension name from RenderingContext and value not manually specified',
×
52
                1364167519
×
53
            );
×
54
        }
55
        return $extensionName;
×
56
    }
57
}
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