‪TYPO3CMS  9.5
TYPO3\CMS\Install\Updates\AbstractUpdate Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\AbstractUpdate:
TYPO3\CMS\Install\Updates\UpgradeWizardInterface TYPO3\CMS\Install\Updates\ChattyInterface

Public Member Functions

 __construct ()
 
string getTitle ()
 
 setTitle ($title)
 
string getIdentifier ()
 
 setIdentifier ($identifier)
 
bool shouldRenderWizard ()
 
bool checkForUpdate (&$description)
 
bool performUpdate (array &$dbQueries, &$customMessage)
 
string getDescription ()
 
bool executeUpdate ()
 
bool updateNecessary ()
 
string[] getPrerequisites ()
 
 setOutput (OutputInterface $output)
 

Public Attributes

string $userInput
 

Protected Member Functions

bool checkIfTableExists ($table)
 
 installExtensions (array $extensionKeys)
 
 markWizardAsDone ($confValue=1)
 
bool isWizardDone ()
 

Protected Attributes

string $title
 
string $identifier
 
OutputInterface $output
 

Detailed Description

Generic class that every update wizard class inherits from. Used by the update wizard in the install tool.

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 28 of file AbstractUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\Updates\AbstractUpdate::__construct ( )

Definition at line 30 of file AbstractUpdate.php.

Member Function Documentation

◆ checkForUpdate()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::checkForUpdate ( $description)
abstract

Checks whether updates are required.

Parameters
string&$description‪The description for the update
Returns
‪bool Whether an update is required (TRUE) or not (FALSE)

Referenced by TYPO3\CMS\Install\Updates\AbstractUpdate\shouldRenderWizard(), and TYPO3\CMS\Install\Updates\AbstractUpdate\updateNecessary().

◆ checkIfTableExists()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::checkIfTableExists (   $table)
protected

Check if given table exists

Parameters
string$table
Returns
‪bool

Definition at line 141 of file AbstractUpdate.php.

◆ executeUpdate()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::executeUpdate ( )

Execute the update Called when a wizard reports that an update is necessary

Returns
‪bool

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 242 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\performUpdate().

◆ getDescription()

string TYPO3\CMS\Install\Updates\AbstractUpdate::getDescription ( )

Return the description for this wizard

Returns
‪string

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 227 of file AbstractUpdate.php.

◆ getIdentifier()

string TYPO3\CMS\Install\Updates\AbstractUpdate::getIdentifier ( )

Returns the identifier of this class

Returns
‪string The identifier of this update wizard

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 93 of file AbstractUpdate.php.

◆ getPrerequisites()

string [] TYPO3\CMS\Install\Updates\AbstractUpdate::getPrerequisites ( )

Returns an array of class names of Prerequisite classes This way a wizard can define dependencies like "database up-to-date" or "reference index updated"

Returns
‪string[]

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 281 of file AbstractUpdate.php.

◆ getTitle()

string TYPO3\CMS\Install\Updates\AbstractUpdate::getTitle ( )

Returns the title attribute

Deprecated:
‪Deprecated since TYPO3 v9
Returns
‪string The title of this update wizard

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 62 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\$identifier, and TYPO3\CMS\Install\Updates\AbstractUpdate\$title.

◆ installExtensions()

TYPO3\CMS\Install\Updates\AbstractUpdate::installExtensions ( array  $extensionKeys)
protected

This method can be called to install extensions following all proper processes (e.g. installing in extList, respecting priority, etc.)

Parameters
array$extensionKeys‪List of keys of extensions to install

Definition at line 178 of file AbstractUpdate.php.

◆ isWizardDone()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::isWizardDone ( )
protected

Checks if this wizard has been "done" before

Returns
‪bool TRUE if wizard has been done before, FALSE otherwise

Definition at line 212 of file AbstractUpdate.php.

◆ markWizardAsDone()

TYPO3\CMS\Install\Updates\AbstractUpdate::markWizardAsDone (   $confValue = 1)
protected

Marks some wizard as being "seen" so that it not shown again.

Writes the info in LocalConfiguration.php

Parameters
mixed$confValue‪The configuration is set to this value

Definition at line 198 of file AbstractUpdate.php.

◆ performUpdate()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::performUpdate ( array &  $dbQueries,
$customMessage 
)
abstract

Performs the accordant updates.

Parameters
array&$dbQueries‪Queries done in this update
string&$customMessage‪Custom message
Returns
‪bool Whether everything went smoothly or not

Referenced by TYPO3\CMS\Install\Updates\AbstractUpdate\executeUpdate().

◆ setIdentifier()

TYPO3\CMS\Install\Updates\AbstractUpdate::setIdentifier (   $identifier)

Sets the identifier attribute

Parameters
string$identifier‪The identifier of this update wizard

Definition at line 107 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\$identifier.

◆ setOutput()

TYPO3\CMS\Install\Updates\AbstractUpdate::setOutput ( OutputInterface  $output)

Setter injection for output into upgrade wizards

Parameters
OutputInterface$output

Implements TYPO3\CMS\Install\Updates\ChattyInterface.

Definition at line 297 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\$output.

◆ setTitle()

TYPO3\CMS\Install\Updates\AbstractUpdate::setTitle (   $title)

Sets the title attribute

Parameters
string$title‪The title of this update wizard

Definition at line 79 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\$title.

◆ shouldRenderWizard()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::shouldRenderWizard ( )

Simple wrapper function that helps dealing with the compatibility layer that some update wizards don't have a second parameter thus, it evaluates everything already

Returns
‪bool If the wizard should be shown at all on the overview page
See also
checkForUpdate()

Definition at line 124 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\checkForUpdate().

◆ updateNecessary()

bool TYPO3\CMS\Install\Updates\AbstractUpdate::updateNecessary ( )

Is an update necessary? Is used to determine whether a wizard needs to be run. Check if data for migration exists.

Returns
‪bool

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 262 of file AbstractUpdate.php.

References TYPO3\CMS\Install\Updates\AbstractUpdate\checkForUpdate().

Member Data Documentation

◆ $identifier

string TYPO3\CMS\Install\Updates\AbstractUpdate::$identifier
protected

◆ $output

OutputInterface TYPO3\CMS\Install\Updates\AbstractUpdate::$output
protected

◆ $title

string TYPO3\CMS\Install\Updates\AbstractUpdate::$title
protected

The human-readable title of the upgrade wizard

Definition at line 38 of file AbstractUpdate.php.

Referenced by TYPO3\CMS\Install\Updates\AbstractUpdate\getTitle(), and TYPO3\CMS\Install\Updates\AbstractUpdate\setTitle().

◆ $userInput

string TYPO3\CMS\Install\Updates\AbstractUpdate::$userInput

User input, set from outside

Definition at line 50 of file AbstractUpdate.php.