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
|
|
|
* |
11
|
|
|
* This script is part of the TYPO3 project. The TYPO3 project is |
12
|
|
|
* free software; you can redistribute it and/or modify |
13
|
|
|
* it under the terms of the GNU General Public License as published by |
14
|
|
|
* the Free Software Foundation; either version 3 of the License, or |
15
|
|
|
* (at your option) any later version. |
16
|
|
|
* |
17
|
|
|
* The GNU General Public License can be found at |
18
|
|
|
* http://www.gnu.org/copyleft/gpl.html. |
19
|
|
|
* |
20
|
|
|
* This script is distributed in the hope that it will be useful, |
21
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
22
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23
|
|
|
* GNU General Public License for more details. |
24
|
|
|
* |
25
|
|
|
* This copyright notice MUST APPEAR in all copies of the script! |
26
|
|
|
***************************************************************/ |
27
|
|
|
|
28
|
|
|
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider; |
|
|
|
|
29
|
|
|
use TYPO3\CMS\Core\Imaging\IconRegistry; |
|
|
|
|
30
|
|
|
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; |
|
|
|
|
31
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility; |
|
|
|
|
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Class BackendUtility |
35
|
|
|
* |
36
|
|
|
* @package AOE\Crawler\Utility |
37
|
|
|
* |
38
|
|
|
* @codeCoverageIgnore |
39
|
|
|
*/ |
40
|
|
|
class BackendUtility |
41
|
|
|
{ |
42
|
|
|
/** |
43
|
|
|
* Registers the crawler info module function |
44
|
|
|
* |
45
|
|
|
* @return void |
46
|
|
|
*/ |
47
|
|
|
public static function registerInfoModuleFunction() |
48
|
|
|
{ |
49
|
|
|
ExtensionManagementUtility::insertModuleFunction( |
50
|
|
|
'web_info', |
51
|
|
|
'tx_crawler_modfunc1', |
52
|
|
|
null, |
53
|
|
|
'LLL:EXT:crawler/Resources/Private/Language/Backend.xlf:moduleFunction.tx_crawler_modfunc1' |
54
|
|
|
); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Registers the crawler click menu item |
59
|
|
|
* |
60
|
|
|
* @return void |
61
|
|
|
*/ |
62
|
|
|
public static function registerClickMenuItem() |
63
|
|
|
{ |
64
|
|
|
$GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = [ |
65
|
|
|
'name' => \AOE\Crawler\ClickMenu\CrawlerClickMenu::class |
66
|
|
|
]; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* Registers the context sensitive help for TCA fields |
71
|
|
|
* |
72
|
|
|
* @return void |
73
|
|
|
*/ |
74
|
|
|
public static function registerContextSensitiveHelpForTcaFields() |
75
|
|
|
{ |
76
|
|
|
ExtensionManagementUtility::addLLrefForTCAdescr( |
77
|
|
|
'tx_crawler_configuration', |
78
|
|
|
'EXT:crawler/Resources/Private/Language/locallang_csh_tx_crawler_configuration.xlf' |
79
|
|
|
); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Registers icons for use in the IconFactory |
84
|
|
|
* |
85
|
|
|
* @return void |
86
|
|
|
*/ |
87
|
|
|
public static function registerIcons() |
88
|
|
|
{ |
89
|
|
|
self::registerStartIcon(); |
90
|
|
|
self::registerStopIcon(); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* Register Start Icon |
95
|
|
|
* |
96
|
|
|
* @return void |
97
|
|
|
*/ |
98
|
|
|
private static function registerStartIcon() |
99
|
|
|
{ |
100
|
|
|
/** @var IconRegistry $iconRegistry */ |
101
|
|
|
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); |
102
|
|
|
$iconRegistry->registerIcon( |
103
|
|
|
'tx-crawler-start', |
104
|
|
|
SvgIconProvider::class, |
105
|
|
|
['source' => 'EXT:crawler/Resources/Private/Icons/crawler_start.svg'] |
106
|
|
|
); |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* Register Stop Icon |
111
|
|
|
* |
112
|
|
|
* @return void |
113
|
|
|
*/ |
114
|
|
|
private static function registerStopIcon() |
115
|
|
|
{ |
116
|
|
|
/** @var IconRegistry $iconRegistry */ |
117
|
|
|
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class); |
118
|
|
|
$iconRegistry->registerIcon( |
119
|
|
|
'tx-crawler-stop', |
120
|
|
|
SvgIconProvider::class, |
121
|
|
|
['source' => 'EXT:crawler/Resources/Private/Icons/crawler_stop.svg'] |
122
|
|
|
); |
123
|
|
|
} |
124
|
|
|
} |
125
|
|
|
|
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