1
|
|
|
<?php |
2
|
|
|
namespace Gilbertsoft\Lib\Service; |
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\Service\AbstractInstallService; |
29
|
|
|
use TYPO3\CMS\Core\Messaging\FlashMessage; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* GS Install Service class. |
33
|
|
|
*/ |
34
|
|
|
class InstallService extends AbstractInstallService |
35
|
|
|
{ |
36
|
|
|
/** |
37
|
|
|
* Executes the setup tasks if extension is installed. |
38
|
|
|
* |
39
|
|
|
* @param string $extensionKey Installed extension key |
40
|
|
|
*/ |
41
|
|
|
public function afterInstall($extensionKey) |
42
|
|
|
{ |
43
|
|
|
if ($extensionKey == $this->extensionKey) |
44
|
|
|
{ |
45
|
|
|
// insert custom code here |
46
|
|
|
} |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Executes the setup tasks if extension is uninstalled. |
51
|
|
|
* |
52
|
|
|
* @param string $extensionKey Uninstalled extension key |
53
|
|
|
*/ |
54
|
|
|
public function afterUninstall($extensionKey) |
55
|
|
|
{ |
56
|
|
|
if ($extensionKey == $this->extensionKey) |
57
|
|
|
{ |
58
|
|
|
// insert custom code here |
59
|
|
|
} |
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
|