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

tomasnorre / crawler / 19707535375

26 Nov 2025 02:42PM UTC coverage: 69.22% (-0.3%) from 69.481%
19707535375

Pull #1219

github

web-flow
Merge 26ecb95d8 into ea0653a4e
Pull Request #1219: !!! [TASK] Remove PHP 8.1 support

13 of 15 new or added lines in 6 files covered. (86.67%)

7 existing lines in 2 files now uncovered.

1934 of 2794 relevant lines covered (69.22%)

3.2 hits per line

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

92.31
/Classes/Utility/TcaUtility.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace AOE\Crawler\Utility;
6

7
/*
8
 * (c) 2020 AOE GmbH <dev@aoe.com>
9
 *
10
 * This file is part of the TYPO3 Crawler Extension.
11
 *
12
 * It is free software; you can redistribute it and/or modify it under
13
 * the terms of the GNU General Public License, either version 2
14
 * of the License, or any later version.
15
 *
16
 * For the full copyright and license information, please read the
17
 * LICENSE.txt file that was distributed with this source code.
18
 *
19
 * The TYPO3 project - inspiring people to share!
20
 */
21

22
use TYPO3\CMS\Core\Package\PackageManager;
23
use TYPO3\CMS\Core\Utility\GeneralUtility;
24

25
/**
26
 * @internal since v9.2.5
27
 */
28
class TcaUtility
29
{
30
    /**
31
     * Get crawler processing instructions.
32
     * This function is called as a itemsProcFunc in tx_crawler_configuration.processing_instruction_filter
33
     *
34
     * @return array
35
     */
36
    public function getProcessingInstructions(array $configuration)
37
    {
38
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions'] ?? null)) {
3✔
39
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions'] as $extensionKey => $extensionConfiguration) {
3✔
40
                $configuration['items'][] = [
2✔
41
                    'label' => $extensionConfiguration['value'] . ' [' . $extensionConfiguration['key'] . ']',
2✔
42
                    'value' => $extensionConfiguration['key'],
2✔
43
                    'icon' => $this->getExtensionIcon($extensionKey),
2✔
44
                ];
2✔
45
            }
46
        }
47

48
        return $configuration;
3✔
49
    }
50

51
    private function getExtensionIcon(string $extensionKey): string
52
    {
53
        $packageManager = GeneralUtility::makeInstance(PackageManager::class);
2✔
54
        $package = $packageManager->getPackage($extensionKey);
2✔
55
        if ($package->getPackageIcon()) {
2✔
56
            return $fullIconPath = $package->getPackagePath() . $package->getPackageIcon();
2✔
57
        }
58

NEW
59
        return '';
×
60
    }
61
}
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