Passed
Push — master ( e0e946...6cf860 )
by Simon
02:23
created

InstallService::afterUninstall()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of the "GS Library" Extension for TYPO3 CMS.
5
 *
6
 * Copyright (C) 2017 by Gilbertsoft (gilbertsoft.org)
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * For the full license information, please read the LICENSE file that
19
 * was distributed with this source code.
20
 *
21
 * The TYPO3 project - inspiring people to share!
22
 */
23
24
namespace Gilbertsoft\Lib\Tests\Unit\Fixtures;
25
26
27
/**
28
 * Use declarations
29
 */
30
use TYPO3\CMS\Core\Messaging\FlashMessage;
31
32
33
/**
34
 * GS Install Service class.
35
 */
36
class InstallService extends \Gilbertsoft\Lib\Service\AbstractInstallService
37
{
38
	/**
39
	 * Executes the setup tasks if extension is installed.
40
	 *
41
	 * @param string $extensionKey Installed extension key
42
	 */
43
	public function afterInstall($extensionKey)
44
	{
45
		if ($extensionKey == $this->extensionKey)
46
		{
47
			$this->showFlashMessage('afterInstall');
48
		}
49
	}
50
51
	/**
52
	 * Executes the setup tasks if extension is uninstalled.
53
	 *
54
	 * @param string $extensionKey Uninstalled extension key
55
	 */
56
	public function afterUninstall($extensionKey)
57
	{
58
		if ($extensionKey == $this->extensionKey)
59
		{
60
			$this->showFlashMessage('afterUninstall');
61
		}
62
	}
63
}
64