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

FluidTYPO3 / vhs / 30001290505

23 Jul 2026 10:57AM UTC coverage: 70.309% (-1.7%) from 72.022%
30001290505

push

github

NamelessCoder
[TER] 8.0.0

4819 of 6854 relevant lines covered (70.31%)

6.54 hits per line

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

80.0
/Classes/ViewHelpers/Page/AbsoluteUrlViewHelper.php
1
<?php
2
namespace FluidTYPO3\Vhs\ViewHelpers\Page;
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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
14

15
/**
16
 * Returns a full, absolute URL to this page with all arguments.
17
 */
18
class AbsoluteUrlViewHelper extends AbstractViewHelper
19
{
20
    /**
21
     * @param array $arguments
22
     * @param \Closure $renderChildrenClosure
23
     * @param RenderingContextInterface $renderingContext
24
     * @return mixed
25
     */
26
    public static function renderStatic(
27
        array $arguments,
28
        \Closure $renderChildrenClosure,
29
        RenderingContextInterface $renderingContext
30
    ) {
31
        $url = (string) RequestResolver::getRequest()->getUri();
3✔
32
        $siteUrl = RequestResolver::getFrontendUrlPrefix();
3✔
33
        if (!str_starts_with($url, $siteUrl)) {
3✔
34
            $url = $siteUrl . $url;
×
35
        }
36
        return $url;
3✔
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc