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

FluidTYPO3 / vhs / 13566190336

27 Feb 2025 12:18PM UTC coverage: 72.127% (-0.6%) from 72.746%
13566190336

push

github

NamelessCoder
[TER] 7.1.0

5649 of 7832 relevant lines covered (72.13%)

20.01 hits per line

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

83.33
/Classes/ViewHelpers/Content/GetViewHelper.php
1
<?php
2
namespace FluidTYPO3\Vhs\ViewHelpers\Content;
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\Traits\ArgumentOverride;
12
use FluidTYPO3\Vhs\Utility\ContextUtility;
13

14
/**
15
 * ViewHelper used to render get content elements in Fluid templates
16
 *
17
 * Does not work in the TYPO3 backend.
18
 */
19
class GetViewHelper extends AbstractContentViewHelper
20
{
21
    use ArgumentOverride;
22

23
    public function initializeArguments(): void
24
    {
25
        parent::initializeArguments();
7✔
26
        $this->overrideArgument('render', 'boolean', 'Return rendered result', false, false);
7✔
27
    }
28

29
    /**
30
     * Render method
31
     *
32
     * @return mixed
33
     */
34
    public function render()
35
    {
36
        if (ContextUtility::isBackend()) {
7✔
37
            return '';
×
38
        }
39
        $contentRecords = $this->getContentRecords();
7✔
40
        return $contentRecords;
7✔
41
    }
42
}
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