1
|
|
|
<?php |
2
|
|
|
namespace AOE\Crawler\Utility; |
3
|
|
|
|
4
|
|
|
/* |
5
|
|
|
* Copyright notice |
6
|
|
|
* |
7
|
|
|
* (c) 2016 AOE GmbH <[email protected]> |
8
|
|
|
* |
9
|
|
|
* All rights reserved |
10
|
|
|
* This file is part of the TYPO3 CMS project. |
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\Utility\ExtensionManagementUtility; |
|
|
|
|
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Class TcaUtility |
26
|
|
|
* |
27
|
|
|
* @package AOE\Crawler\Utility |
28
|
|
|
*/ |
29
|
|
|
class TcaUtility |
30
|
|
|
{ |
31
|
|
|
/** |
32
|
|
|
* Get crawler processing instructions. |
33
|
|
|
* This function is called as a itemsProcFunc in tx_crawler_configuration.processing_instruction_filter |
34
|
|
|
* |
35
|
|
|
* @param array $configuration |
36
|
|
|
* @return array |
37
|
|
|
*/ |
38
|
|
|
public function getProcessingInstructions(array $configuration) |
39
|
|
|
{ |
40
|
|
|
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions'])) { |
41
|
|
|
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions'] as $key => $value) { |
42
|
|
|
$configuration['items'][] = [$value . ' [' . $key . ']', $key, $this->getExtensionIcon($key)]; |
43
|
|
|
} |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
return $configuration; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Get path to ext_icon.gif from processing instruction key |
51
|
|
|
* |
52
|
|
|
* @param string $key Like tx_realurl_rebuild |
53
|
|
|
* @return string |
54
|
|
|
*/ |
55
|
|
|
protected function getExtensionIcon($key) |
56
|
|
|
{ |
57
|
|
|
$extIcon = ''; |
58
|
|
|
|
59
|
|
|
if (method_exists(ExtensionManagementUtility::class, 'getExtensionKeyByPrefix')) { |
60
|
|
|
$parts = explode('_', $key); |
61
|
|
|
if (is_array($parts) && count($parts) > 2) { |
62
|
|
|
$extensionKey = ExtensionManagementUtility::getExtensionKeyByPrefix('tx_' . $parts[1]); |
63
|
|
|
$extIcon = ExtensionManagementUtility::siteRelPath($extensionKey) . 'ext_icon.gif'; |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
return $extIcon; |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths