• 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/StructuredData/TypoScriptStructuredDataProvider.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\StructuredData;
13

14
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
15
use TYPO3\CMS\Core\Site\SiteFinder;
16
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
17
use TYPO3\CMS\Core\Utility\GeneralUtility;
18
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
19
use YoastSeoForTypo3\YoastSeo\Service\Frontend\FrontendServiceInterface;
20

21
class TypoScriptStructuredDataProvider implements StructuredDataProviderInterface
22
{
23
    public function __construct(
24
        protected SiteFinder $siteFinder,
25
        protected PageRepository $pageRepository,
26
        protected TypoScriptService $typoScriptService,
27
        protected FrontendServiceInterface $frontendService,
UNCOV
28
    ) {}
×
29

30
    /**
31
     * @return array<int, array<int|string, mixed>>
32
     */
33
    public function getData(): array
34
    {
35
        $data = [];
×
NEW
36
        $contentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class);
×
37

38
        foreach (
NEW
39
            $this->frontendService->getTyposcriptConfiguration()['structuredData.']['data.'] ?? [] as $dataConfig
×
40
        ) {
41
            if (!isset($dataConfig['type'], $dataConfig['context'])) {
×
42
                continue;
×
43
            }
44

45
            $item = [];
×
46
            $config = $this->typoScriptService->convertTypoScriptArrayToPlainArray($dataConfig);
×
47

48
            foreach ($config as $key => $value) {
×
49
                $cObject = $key . '.';
×
50
                if (isset($dataConfig[$cObject])) {
×
NEW
51
                    $value = $contentObjectRenderer->stdWrap((string)$key, $dataConfig[$cObject]);
×
52
                }
53
                $key = in_array($key, ['type', 'context']) ? '@' . $key : $key;
×
54

55
                $item[$key] = $value;
×
56
            }
57
            $data[] = $item;
×
58
        }
59

60
        return $data;
×
61
    }
62
}
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