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

Yoast / Yoast-SEO-for-TYPO3 / 21521134747

30 Jan 2026 03:30PM UTC coverage: 0.866% (-0.4%) from 1.275%
21521134747

push

github

RinyVT
[FEATURE] Version 12.0.0, added v14 support, removed v11 support including php8.0 and php8.1, rewrote backend javascript functionality to typescript and webcomponents

0 of 550 new or added lines in 53 files covered. (0.0%)

33 existing lines in 21 files now uncovered.

23 of 2657 relevant lines covered (0.87%)

0.03 hits per line

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

0.0
/Classes/Form/Element/InternalLinkingSuggestion.php
1
<?php
2

3
/**
4
 * This file is part of the "yoast_seo" extension for TYPO3 CMS.
5
 *
6
 * For the full copyright and license information, please read the
7
 * LICENSE.txt file that was distributed with this source code.
8
 */
9

10
declare(strict_types=1);
11

12
namespace YoastSeoForTypo3\YoastSeo\Form\Element;
13

14
use TYPO3\CMS\Backend\Routing\UriBuilder;
15
use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction;
16
use YoastSeoForTypo3\YoastSeo\Service\Form\NodeTemplateService;
17
use YoastSeoForTypo3\YoastSeo\Service\Javascript\JsonTranslationsService;
18
use YoastSeoForTypo3\YoastSeo\Service\LocaleService;
19
use YoastSeoForTypo3\YoastSeo\Utility\PathUtility;
20

21
class InternalLinkingSuggestion extends AbstractLabeledFormElement
22
{
23
    public function __construct(
24
        protected LocaleService $localeService,
25
        protected NodeTemplateService $templateService,
26
        protected JsonTranslationsService $jsonTranslationsService,
27
        protected UriBuilder $uriBuilder
NEW
28
    ) {}
×
29

30
    /**
31
     * @param array<string, mixed> $data
32
     */
33
    public function setData(array $data): void
34
    {
NEW
35
        $this->data = $data;
×
36
    }
37

38
    protected int $languageId;
39
    protected int $currentPage;
40

41
    /**
42
     * @return array<string, mixed>
43
     */
44
    public function render(): array
45
    {
46
        $this->init();
×
47

48
        $resultArray = $this->initializeResultArray();
×
49

50
        if (($locale = $this->localeService->getLocale($this->currentPage, $this->languageId)) === null) {
×
NEW
51
            $resultArray['html'] = $this->getLabel() . $this->templateService->renderView(
×
NEW
52
                'InternalLinkingSuggestion',
×
NEW
53
                ['languageError' => true]
×
NEW
54
            );
×
UNCOV
55
            return $resultArray;
×
56
        }
57
        $resultArray['stylesheetFiles'][] = 'EXT:yoast_seo/Resources/Public/CSS/yoast.min.css';
×
58

NEW
59
        $resultArray['javaScriptModules'][] = JavaScriptModuleInstruction::create('@yoast/yoast-seo-for-typo3/linking-suggestions.js')->invoke(
×
NEW
60
            'initialize',
×
NEW
61
            [
×
NEW
62
                'urls' => [
×
NEW
63
                    'workerUrl' => PathUtility::getPublicPathToResources() . '/JavaScript/dist/worker.js',
×
NEW
64
                    'linkingSuggestions' => (string)$this->uriBuilder->buildUriFromRoute(
×
NEW
65
                        'ajax_yoast_internal_linking_suggestions'
×
NEW
66
                    ),
×
NEW
67
                ],
×
68
                'locale' => $locale,
×
NEW
69
                'languageId' => $this->languageId,
×
NEW
70
                'currentPage' => $this->currentPage,
×
NEW
71
                'supportedLanguages' => $this->localeService->getSupportedLanguages(),
×
NEW
72
            ]
×
NEW
73
        );
×
74

NEW
75
        $resultArray['html'] = $this->getLabel() . $this->templateService->renderView('InternalLinkingSuggestion');
×
76

NEW
77
        $this->jsonTranslationsService->addTranslations();
×
78

79
        return $resultArray;
×
80
    }
81

82
    protected function init(): void
83
    {
84
        $this->currentPage = $this->data['parentPageRow']['uid'];
×
85
        $this->languageId = $this->localeService->getLanguageIdFromData($this->data);
×
86
    }
87
}
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