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

Yoast / Yoast-SEO-for-TYPO3 / 24723291290

21 Apr 2026 12:50PM UTC coverage: 10.457% (+9.2%) from 1.275%
24723291290

push

github

web-flow
Merge pull request #632 from Yoast/feature/yoast-v12

[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

40 of 806 new or added lines in 69 files covered. (4.96%)

40 existing lines in 23 files now uncovered.

284 of 2716 relevant lines covered (10.46%)

0.29 hits per line

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

0.0
/Classes/Form/Element/FocusKeywordAnalysis.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\Form\AbstractNode;
15
use YoastSeoForTypo3\YoastSeo\Constants\TableNames;
16
use YoastSeoForTypo3\YoastSeo\Service\Form\NodeTemplateService;
17
use YoastSeoForTypo3\YoastSeo\Utility\YoastUtility;
18

19
class FocusKeywordAnalysis extends AbstractNode
20
{
21
    public function __construct(
22
        protected NodeTemplateService $templateService
NEW
23
    ) {}
×
24

25
    /**
26
     * @param array<string, mixed> $data
27
     */
28
    public function setData(array $data): void
29
    {
NEW
30
        $this->data = $data;
×
31
    }
32

33
    /**
34
     * @return array<string, mixed>
35
     */
36
    public function render(): array
37
    {
38
        $resultArray = $this->initializeResultArray();
×
39

NEW
40
        if ($this->data['tableName'] === TableNames::PAGES && !in_array(
×
NEW
41
            (int)($this->data['databaseRow']['doktype'][0] ?? 0),
×
NEW
42
            YoastUtility::getAllowedDoktypes()
×
NEW
43
        )) {
×
44
            $resultArray['html'] = $this->templateService->renderView('FocusKeywordAnalysis', ['wrongDoktype' => true]);
×
45
            return $resultArray;
×
46
        }
47

48
        if ($focusKeywordField = $this->getFocusKeywordField()) {
×
49
            $focusKeywordField = $this->getFieldSelector($focusKeywordField);
×
50
        }
51

52
        $subtype = '';
×
NEW
53
        if ($this->data['tableName'] === TableNames::RELATED_FOCUSKEYWORD) {
×
54
            $subtype = 'rk' . $this->data['vanillaUid'];
×
55
        }
56

57
        $resultArray['html'] = $this->templateService->renderView('FocusKeywordAnalysis', [
×
58
            'focusKeywordField' => $focusKeywordField,
×
59
            'subtype' => $subtype,
×
60
        ]);
×
61
        return $resultArray;
×
62
    }
63

64
    protected function getFocusKeywordField(): ?string
65
    {
66
        if (!empty($this->data['parameterArray']['fieldConf']['config']['settings']['focusKeywordField'] ?? '')) {
×
67
            return $this->data['parameterArray']['fieldConf']['config']['settings']['focusKeywordField'];
×
68
        }
69
        return null;
×
70
    }
71

72
    protected function getFieldSelector(string $field): string
73
    {
NEW
74
        return "data[{$this->data['tableName']}][{$this->data['vanillaUid']}][$field]";
×
75
    }
76
}
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