• 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/Service/SnippetPreviewService.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\Service;
13

14
use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction;
15
use TYPO3\CMS\Core\Page\PageRenderer;
16
use YoastSeoForTypo3\YoastSeo\Dto\RequestData;
17
use YoastSeoForTypo3\YoastSeo\Service\Javascript\JsonTranslationsService;
18
use YoastSeoForTypo3\YoastSeo\Utility\PathUtility;
19

20
class SnippetPreviewService
21
{
22
    public function __construct(
23
        protected UrlService $urlService,
24
        protected PageRenderer $pageRenderer,
25
        protected LocaleService $localeService,
26
        protected JsonTranslationsService $jsonTranslationsService
UNCOV
27
    ) {}
×
28

29
    /**
30
     * @param array<string, mixed> $currentData
31
     * @param array<string, mixed> $additionalConfiguration
32
     */
33
    public function buildSnippetPreview(
34
        RequestData $requestData,
35
        array $currentData,
36
        array $additionalConfiguration,
37
    ): void {
38
        $config = [
×
39
            'urls' => [
×
40
                'workerUrl' => PathUtility::getPublicPathToResources() . '/JavaScript/dist/worker.js',
×
41
                'saveScores' => $this->urlService->getSaveScoresUrl(),
×
42
                'prominentWords' => $this->urlService->getProminentWordsUrl(),
×
NEW
43
                'yoastCss' => PathUtility::getPublicPathToResources() . '/CSS/yoast.min.css',
×
44
            ],
×
45
            'isCornerstoneContent' => (bool)($currentData['tx_yoastseo_cornerstone'] ?? false),
×
46
            'focusKeyphrase' => [
×
47
                'keyword' => (string)($currentData['tx_yoastseo_focuskeyword'] ?? ''),
×
48
                'synonyms' => (string)($currentData['tx_yoastseo_focuskeyword_synonyms'] ?? ''),
×
49
            ],
×
50
            'translations' => [$this->localeService->getTranslations()],
×
51
            'supportedLanguages' => $this->localeService->getSupportedLanguages(),
×
NEW
52
            'requestData' => $requestData->toArray(),
×
UNCOV
53
        ];
×
54

NEW
55
        $this->pageRenderer->getJavaScriptRenderer()->addJavaScriptModuleInstruction(
×
NEW
56
            JavaScriptModuleInstruction::create('@yoast/yoast-seo-for-typo3/yoast-plugin.js')->invoke(
×
NEW
57
                'initialize',
×
NEW
58
                array_merge($config, $additionalConfiguration)
×
NEW
59
            )
×
NEW
60
        );
×
61

NEW
62
        $this->jsonTranslationsService->addTranslations();
×
UNCOV
63
        $this->pageRenderer->addCssFile('EXT:yoast_seo/Resources/Public/CSS/yoast.min.css');
×
64
    }
65
}
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