‪TYPO3CMS  10.4
Typo3DbExtractionUpdate.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
25 {
29  protected ‪$confirmation;
30 
31  public function ‪__construct()
32  {
33  $this->extension = new ‪ExtensionModel(
34  'typo3db_legacy',
35  '$GLOBALS[\'TYPO3_DB\'] compatibility layer',
36  '1.1.1',
37  'friendsoftypo3/typo3db-legacy',
38  'This extension provides the well-known database API $GLOBALS[\'TYPO3_DB\'] used in previous TYPO3 versions for extensions that still rely on it.'
39  );
40 
41  $this->confirmation = new ‪Confirmation(
42  'Are you sure?',
43  'You should install EXT:typo3db_legacy only if you really need it. ' . $this->extension->getDescription(),
44  false
45  );
46  }
47 
53  public function ‪getConfirmation(): ‪Confirmation
54  {
56  }
57 
64  public function ‪getIdentifier(): string
65  {
66  return 'typo3DbLegacyExtension';
67  }
68 
74  public function ‪getTitle(): string
75  {
76  return 'Install extension "typo3db_legacy" from TER';
77  }
78 
84  public function ‪getDescription(): string
85  {
86  return 'The old database API populated as $GLOBALS[\'TYPO3_DB\'] has been extracted into'
87  . ' the TYPO3 Extension Repository. This update downloads the TYPO3 extension typo3db_legacy from the TER.'
88  . ' Use this if you\'re dealing with extensions in the instance that still rely on the old database API.';
89  }
90 
97  public function ‪updateNecessary(): bool
98  {
99  return !‪ExtensionManagementUtility::isLoaded($this->extension->getKey());
100  }
101 
109  public function ‪getPrerequisites(): array
110  {
111  return [];
112  }
113 }
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\getConfirmation
‪TYPO3 CMS Install Updates Confirmation getConfirmation()
Definition: Typo3DbExtractionUpdate.php:52
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\updateNecessary
‪bool updateNecessary()
Definition: Typo3DbExtractionUpdate.php:96
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\$confirmation
‪TYPO3 CMS Install Updates Confirmation $confirmation
Definition: Typo3DbExtractionUpdate.php:28
‪TYPO3\CMS\Install\Updates
Definition: AbstractDownloadExtensionUpdate.php:16
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:43
‪TYPO3\CMS\Install\Updates\ExtensionModel
Definition: ExtensionModel.php:26
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\getTitle
‪string getTitle()
Definition: Typo3DbExtractionUpdate.php:73
‪TYPO3\CMS\Install\Updates\Confirmation
Definition: Confirmation.php:21
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\getIdentifier
‪string getIdentifier()
Definition: Typo3DbExtractionUpdate.php:63
‪TYPO3\CMS\Install\Updates\AbstractDownloadExtensionUpdate
Definition: AbstractDownloadExtensionUpdate.php:31
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate
Definition: Typo3DbExtractionUpdate.php:25
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\__construct
‪__construct()
Definition: Typo3DbExtractionUpdate.php:30
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\getDescription
‪string getDescription()
Definition: Typo3DbExtractionUpdate.php:83
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static bool isLoaded($key)
Definition: ExtensionManagementUtility.php:114
‪TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\getPrerequisites
‪string[] getPrerequisites()
Definition: Typo3DbExtractionUpdate.php:108