|
1
|
|
|
<?php |
|
2
|
|
|
namespace Gilbertsoft\Lib\Extension; |
|
3
|
|
|
|
|
4
|
|
|
/* |
|
5
|
|
|
* This file is part of the "GS Library" Extension for TYPO3 CMS. |
|
6
|
|
|
* |
|
7
|
|
|
* Copyright (C) 2017 by Gilbertsoft (gilbertsoft.org) |
|
8
|
|
|
* |
|
9
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
10
|
|
|
* it under the terms of the GNU General Public License as published by |
|
11
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
|
12
|
|
|
* (at your option) any later version. |
|
13
|
|
|
* |
|
14
|
|
|
* This program is distributed in the hope that it will be useful, |
|
15
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17
|
|
|
* GNU General Public License for more details. |
|
18
|
|
|
* |
|
19
|
|
|
* For the full license information, please read the LICENSE file that |
|
20
|
|
|
* was distributed with this source code. |
|
21
|
|
|
* |
|
22
|
|
|
* The TYPO3 project - inspiring people to share! |
|
23
|
|
|
*/ |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* Use declarations |
|
27
|
|
|
*/ |
|
28
|
|
|
use Gilbertsoft\Lib\Extension\ExtensionConfigInterface; |
|
29
|
|
|
use Gilbertsoft\Lib\Utility\Typo3Mode; |
|
30
|
|
|
use Gilbertsoft\Lib\Utility\Typo3Version; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* Abstract extension configuration class. |
|
34
|
|
|
* |
|
35
|
|
|
* Used as base class for the extension configuration. There are various |
|
36
|
|
|
* often used functions available. |
|
37
|
|
|
*/ |
|
38
|
|
|
abstract class AbstractExtensionConfig implements ExtensionConfigInterface |
|
39
|
|
|
{ |
|
40
|
|
|
/** |
|
41
|
|
|
* @see Typo3Mode::isBackend() |
|
42
|
|
|
*/ |
|
43
|
|
|
protected static function isBackend() |
|
44
|
|
|
{ |
|
45
|
|
|
return Typo3Mode::isBackend(); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @see Typo3Mode::isFrontend() |
|
50
|
|
|
*/ |
|
51
|
|
|
protected static function isFrontend() |
|
52
|
|
|
{ |
|
53
|
|
|
return Typo3Mode::isFrontend(); |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @see Typo3Version::isVersion() |
|
58
|
|
|
*/ |
|
59
|
|
|
protected static function isVersion($branchNumberStr) |
|
60
|
|
|
{ |
|
61
|
|
|
return Typo3Version::isVersion($branchNumberStr); |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @see Typo3Version::isCompatVersion() |
|
66
|
|
|
*/ |
|
67
|
|
|
protected static function isCompatVersion($branchNumberStr) |
|
68
|
|
|
{ |
|
69
|
|
|
return Typo3Version::isCompatVersion($branchNumberStr); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* Called from ext_localconf.php, to be implemented in derrived classes. |
|
74
|
|
|
* |
|
75
|
|
|
* @return void |
|
76
|
|
|
* @api |
|
77
|
|
|
*/ |
|
78
|
|
|
abstract public static function localconf($extKey); |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* Called from ext_tables.php, to be implemented in derrived classes. |
|
82
|
|
|
* |
|
83
|
|
|
* @return void |
|
84
|
|
|
* @api |
|
85
|
|
|
*/ |
|
86
|
|
|
abstract public static function tables($extKey); |
|
87
|
|
|
} |
|
|
|
|
|
|
88
|
|
|
|
This check marks files that end in a newline character, i.e. an empy line.