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

FluidTYPO3 / vhs / 11779984761

11 Nov 2024 01:59PM UTC coverage: 72.746% (-0.003%) from 72.749%
11779984761

push

github

NamelessCoder
[TER] 7.0.7

5544 of 7621 relevant lines covered (72.75%)

13.49 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\Utility\ContextUtility;
12

13
/**
14
 * ViewHelper used to render get content elements in Fluid templates
15
 *
16
 * Does not work in the TYPO3 backend.
17
 */
18
class GetViewHelper extends AbstractContentViewHelper
19
{
20
    public function initializeArguments(): void
21
    {
22
        parent::initializeArguments();
6✔
23
        $this->overrideArgument('render', 'boolean', 'Return rendered result', false, false);
6✔
24
    }
25

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