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