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

tomasnorre / crawler / 11237471329

08 Oct 2024 02:20PM UTC coverage: 68.586% (-1.3%) from 69.862%
11237471329

push

github

web-flow
ci: Update coveralls workflow (#1109)

1834 of 2674 relevant lines covered (68.59%)

3.37 hits per line

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

80.0
/Classes/Controller/Backend/Helper/UrlBuilder.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace AOE\Crawler\Controller\Backend\Helper;
6

7
/*
8
 * (c) 2020 AOE GmbH <dev@aoe.com>
9
 *
10
 * This file is part of the TYPO3 Crawler Extension.
11
 *
12
 * It is free software; you can redistribute it and/or modify it under
13
 * the terms of the GNU General Public License, either version 2
14
 * of the License, or any later version.
15
 *
16
 * For the full copyright and license information, please read the
17
 * LICENSE.txt file that was distributed with this source code.
18
 *
19
 * The TYPO3 project - inspiring people to share!
20
 */
21
use TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException;
22
use TYPO3\CMS\Backend\Routing\UriBuilder;
23
use TYPO3\CMS\Core\Http\Uri;
24
use TYPO3\CMS\Core\Utility\GeneralUtility;
25

26
/**
27
 * @internal since v9.2.5
28
 */
29
class UrlBuilder
30
{
31
    /**
32
     * Returns the URL to the current module, including $_GET['id'].
33
     *
34
     * @param array $uriParameters optional parameters to add to the URL
35
     *
36
     * @throws RouteNotFoundException
37
     */
38
    public static function getBackendModuleUrl(array $uriParameters = [], string $module = 'web_site_crawler'): Uri
39
    {
40
        $id = $GLOBALS['TYPO3_REQUEST']->getParsedBody()['id'] ?? $GLOBALS['TYPO3_REQUEST']->getQueryParams()['id'] ?? null;
6✔
41
        if ($id) {
6✔
42
            $uriParameters['id'] = $id;
×
43
        }
44
        /** @var UriBuilder $uriBuilder */
45
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
6✔
46
        return $uriBuilder->buildUriFromRoute($module, $uriParameters);
6✔
47
    }
48
}
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