• 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/DataProviders/PagesWithoutDescriptionOverviewDataProvider.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace YoastSeoForTypo3\YoastSeo\DataProviders;
6

7
use Doctrine\DBAL\Result;
8
use TYPO3\CMS\Core\Database\ConnectionPool;
9
use TYPO3\CMS\Core\Utility\GeneralUtility;
10
use YoastSeoForTypo3\YoastSeo\Utility\YoastUtility;
11

12
class PagesWithoutDescriptionOverviewDataProvider extends AbstractOverviewDataProvider
13
{
14
    public function getKey(): string
15
    {
16
        return 'withoutDescription';
×
17
    }
18

19
    public function getLabel(): string
20
    {
21
        return 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModuleOverview.xlf:withoutDescription';
×
22
    }
23

24
    public function getDescription(): string
25
    {
26
        return 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModuleOverview.xlf:withoutDescription.description';
×
27
    }
28

29
    public function getLink(): ?string
30
    {
31
        return 'https://yoa.st/typo3-meta-description';
×
32
    }
33

34
    protected const PAGES_TABLE = 'pages';
35

36
    public function getResults(array $pageIds = []): ?Result
37
    {
38
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(self::PAGES_TABLE);
×
39

40
        $constraints = [
×
41
            $queryBuilder->expr()->or(
×
42
                $queryBuilder->expr()->eq('description', $queryBuilder->createNamedParameter('')),
×
43
                $queryBuilder->expr()->isNull('description')
×
44
            ),
×
45
            $queryBuilder->expr()->in('doktype', YoastUtility::getAllowedDoktypes()),
×
46
            $queryBuilder->expr()->eq('tx_yoastseo_hide_snippet_preview', 0),
×
NEW
47
            $queryBuilder->expr()->eq('sys_language_uid', $this->dataProviderRequest->getLanguage()),
×
48
        ];
×
49

50
        if (count($pageIds) > 0) {
×
51
            $constraints[] = $queryBuilder->expr()->in(
×
52
                $this->dataProviderRequest->getLanguage() > 0 ? $GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'] : 'uid',
×
53
                $pageIds
×
54
            );
×
55
        }
56

57
        return $queryBuilder->select(...self::PAGES_FIELDS)
×
58
            ->from(self::PAGES_TABLE)
×
59
            ->where(...$constraints)
×
60
            ->executeQuery();
×
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