‪TYPO3CMS  10.4
TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate:
TYPO3\CMS\Install\Updates\AbstractDownloadExtensionUpdate TYPO3\CMS\Install\Updates\UpgradeWizardInterface TYPO3\CMS\Install\Updates\ConfirmableInterface TYPO3\CMS\Install\Updates\ChattyInterface

Public Member Functions

 __construct ()
 
TYPO3 CMS Install Updates Confirmation getConfirmation ()
 
string getIdentifier ()
 
string getTitle ()
 
string getDescription ()
 
bool updateNecessary ()
 
bool executeUpdate ()
 
string[] getPrerequisites ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Install\Updates\AbstractDownloadExtensionUpdate
 setOutput (OutputInterface $output)
 

Protected Member Functions

bool checkIfWizardIsRequired ()
 
 migrateRedirectDomainsToSysRedirect ()
 
string[] getDomainDetails (string $domainName)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Install\Updates\AbstractDownloadExtensionUpdate
bool installExtension (ExtensionModel $extension)
 
string fetchExtension ($extensionKey, $version)
 
string fetchUrl ($url)
 

Protected Attributes

TYPO3 CMS Install Updates Confirmation $confirmation
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Install\Updates\AbstractDownloadExtensionUpdate
string $repositoryUrl = 'https://typo3.org/fileadmin/ter/@filename'
 
OutputInterface $output
 
TYPO3 CMS Install Updates ExtensionModel $extension
 

Detailed Description

Installs EXT:redirect if sys_domain.redirectTo is filled, and migrates the values from redirectTo to a proper sys_redirect entry.

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 28 of file RedirectsExtensionUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 34 of file RedirectsExtensionUpdate.php.

Member Function Documentation

◆ checkIfWizardIsRequired()

bool TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate::checkIfWizardIsRequired ( )
protected

Check if the database field "sys_domain.redirectTo" exists and if so, if there are entries in the DB table with the field filled.

Returns
‪bool
Exceptions

Definition at line 129 of file RedirectsExtensionUpdate.php.

Referenced by TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate\updateNecessary().

◆ executeUpdate()

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

◆ getConfirmation()

TYPO3 CMS Install Updates Confirmation TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate::getConfirmation ( )

Return a confirmation message instance

Returns
‪\TYPO3\CMS\Install\Updates\Confirmation

Implements TYPO3\CMS\Install\Updates\ConfirmableInterface.

Definition at line 56 of file RedirectsExtensionUpdate.php.

References TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate\$confirmation.

◆ getDescription()

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

Return the description for this wizard

Returns
‪string

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 87 of file RedirectsExtensionUpdate.php.

◆ getDomainDetails()

string [] TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate::getDomainDetails ( string  $domainName)
protected

parse_url('example.com/bar') returns ['path' => 'example.com/bar'] - it does not split into 'host' and 'path' if there is no scheme. Adding a scheme in this case leads to more reliable sys_domain transitions.

Parameters
string$domainName
Returns
‪string[]

Definition at line 240 of file RedirectsExtensionUpdate.php.

Referenced by TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate\migrateRedirectDomainsToSysRedirect().

◆ getIdentifier()

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

Return the identifier for this wizard This should be the same string as used in the ext_localconf class registration

Returns
‪string

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 67 of file RedirectsExtensionUpdate.php.

◆ getPrerequisites()

string [] TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate::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 225 of file RedirectsExtensionUpdate.php.

◆ getTitle()

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

Return the speaking name of this wizard

Returns
‪string

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 77 of file RedirectsExtensionUpdate.php.

◆ migrateRedirectDomainsToSysRedirect()

TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate::migrateRedirectDomainsToSysRedirect ( )
protected

Move all sys_domain records with a "redirectTo" value filled (also deleted) to "sys_redirect" record

Definition at line 165 of file RedirectsExtensionUpdate.php.

References TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate\getDomainDetails().

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

◆ updateNecessary()

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

Is an update necessary? Is used to determine whether a wizard needs to be run.

Returns
‪bool

Implements TYPO3\CMS\Install\Updates\UpgradeWizardInterface.

Definition at line 100 of file RedirectsExtensionUpdate.php.

References TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate\checkIfWizardIsRequired().

Member Data Documentation

◆ $confirmation

TYPO3 CMS Install Updates Confirmation TYPO3\CMS\Install\Updates\RedirectsExtensionUpdate::$confirmation
protected