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

Yoast / Yoast-SEO-for-TYPO3 / 13327579701

14 Feb 2025 10:43AM UTC coverage: 1.276%. First build
13327579701

push

github

web-flow
Merge pull request #597 from Yoast/feature/v11

[FEATURE] Release 11.0.0

21 of 894 new or added lines in 76 files covered. (2.35%)

35 of 2744 relevant lines covered (1.28%)

0.04 hits per line

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

0.0
/Classes/ViewHelpers/RecordLinksViewHelper.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace YoastSeoForTypo3\YoastSeo\ViewHelpers;
6

7
use TYPO3\CMS\Backend\Routing\UriBuilder;
8
use TYPO3\CMS\Core\Utility\GeneralUtility;
9
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
10
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
11

12
class RecordLinksViewHelper extends AbstractViewHelper
13
{
14
    public function initializeArguments(): void
15
    {
16
        $this->registerArgument('uid', 'int', 'uid of record to be edited', true);
×
17
        $this->registerArgument('table', 'string', 'target database table', true);
×
18
        $this->registerArgument('command', 'string', '', true, '');
×
19
        $this->registerArgument('module', 'string', '', true, '');
×
20
    }
21

22
    /**
23
     * @param array<string, mixed> $arguments
24
     */
25
    public static function renderStatic(
26
        array $arguments,
27
        \Closure $renderChildrenClosure,
28
        RenderingContextInterface $renderingContext
29
    ): string {
30
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
×
31

32
        $returnUri = $uriBuilder->buildUriFromRoute($arguments['module'], $_GET);
×
33

34
        $module = '';
×
35
        $urlParameters = [];
×
36
        switch ($arguments['command']) {
×
37
            case 'edit':
×
38
                $urlParameters = [
×
39
                    'edit' => [
×
40
                        $arguments['table'] => [
×
NEW
41
                            $arguments['uid'] => $arguments['command'],
×
NEW
42
                        ],
×
43
                    ],
×
NEW
44
                    'returnUrl' => (string)$returnUri,
×
45
                ];
×
46
                $module = 'record_edit';
×
47
                break;
×
48
            case 'delete':
×
49
                $urlParameters = [
×
50
                    'cmd[' . $arguments['table'] . '][' . $arguments['uid'] . '][delete]' => 1,
×
51
                    'redirect' => (string)$returnUri,
×
52
                ];
×
53
                $module = 'tce_db';
×
54
                break;
×
55
        }
56

57
        return (string)$uriBuilder->buildUriFromRoute($module, $urlParameters);
×
58
    }
59
}
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