InstallerController

Install step controller, dispatcher class of step actions.

Internal

This class is a specific controller implementation and is not considered part of the Public TYPO3 API.

Table of Contents

Methods

__construct()  : mixed
checkDatabaseConnectAction()  : ResponseInterface
Check if database connect step needs to be shown
checkDatabaseDataAction()  : ResponseInterface
Check if initial data needs to be imported
checkDatabaseRequirementsAction()  : ResponseInterface
Pre-check whether all requirements for the installed database driver and platform are fulfilled
checkDatabaseSelectAction()  : ResponseInterface
Check if a database needs to be selected
checkEnvironmentAndFoldersAction()  : ResponseInterface
Check if "environment and folders" should be shown
checkTrustedHostsPatternAction()  : ResponseInterface
Check if trusted hosts pattern needs to be adjusted
executeAdjustTrustedHostsPatternAction()  : ResponseInterface
Adjust trusted hosts pattern to '.*' if it does not match yet
executeDatabaseConnectAction()  : ResponseInterface
Test database connect data
executeDatabaseDataAction()  : ResponseInterface
Create main db layout
executeDatabaseSelectAction()  : ResponseInterface
Select / create and test a database
executeDefaultConfigurationAction()  : ResponseInterface
Last step execution: clean up, remove FIRST_INSTALL file, .
executeEnvironmentAndFoldersAction()  : ResponseInterface
Create main folder layout, LocalConfiguration, PackageStates
executeSilentConfigurationUpdateAction()  : ResponseInterface
Execute silent configuration update. May be called multiple times until success = true is returned.
executeSilentTemplateFileUpdateAction()  : ResponseInterface
Execute silent template files update. May be called multiple times until success = true is returned.
initAction()  : ResponseInterface
Init action loads <head> with JS initiating further stuff
mainLayoutAction()  : ResponseInterface
Main layout with progress bar, header
showDatabaseConnectAction()  : ResponseInterface
Show database connect step
showDatabaseDataAction()  : ResponseInterface
Render "import initial data"
showDatabaseSelectAction()  : ResponseInterface
Render "select a database"
showDefaultConfigurationAction()  : ResponseInterface
Show last "create empty site / install distribution"
showEnvironmentAndFoldersAction()  : ResponseInterface
Render "environment and folders"
showInstallerNotAvailableAction()  : ResponseInterface
Render "FIRST_INSTALL file need to exist" view
checkExistingDatabase()  : FlashMessage
Checks whether an existing database on the default connection can be used for a TYPO3 installation. The database name is only persisted to the local configuration if the database is empty.
createNewDatabase()  : FlashMessage
Creates a new database on the default connection
createSiteConfiguration()  : mixed
Creates a site configuration with one language "English" which is the de-facto default language for TYPO3 in general.
getDatabaseConfigurationFromEnvironment()  : array<string|int, mixed>
Try to fetch db credentials from a .env file and see if connect works
getDatabaseConfiguredMysqliSocket()  : string
Returns configured socket, if set.
getDatabaseConfiguredPdoMysqlSocket()  : string
Returns configured socket, if set.
getDatabaseList()  : array<string|int, mixed>
Returns list of available databases (with access-check based on username/password)
getHashedPassword()  : string
This function returns a salted hashed key for new backend user password and install tool password.
importDatabaseData()  : array<string|int, FlashMessage>
Create tables and import static rows
initializeStandaloneView()  : StandaloneView
Helper method to initialize a standalone view instance.
isDatabaseConfigurationComplete()  : bool
Check LocalConfiguration.php for required database settings: - 'username' and 'password' are mandatory, but may be empty - if 'driver' is pdo_sqlite and 'path' is set, its ok, too
isDatabaseConnectSuccessful()  : bool
Test connection with given credentials and return exception message if exception thrown

Methods

__construct()

public __construct(LateBootService $lateBootService, SilentConfigurationUpgradeService $silentConfigurationUpgradeService, SilentTemplateFileUpgradeService $silentTemplateFileUpgradeService, ConfigurationManager $configurationManager, SiteConfiguration $siteConfiguration, Registry $registry, FailsafePackageManager $packageManager, VerifyHostHeader $verifyHostHeader, PermissionsCheck $databasePermissionsCheck) : mixed
Parameters
$lateBootService : LateBootService
$silentConfigurationUpgradeService : SilentConfigurationUpgradeService
$silentTemplateFileUpgradeService : SilentTemplateFileUpgradeService
$configurationManager : ConfigurationManager
$siteConfiguration : SiteConfiguration
$registry : Registry
$packageManager : FailsafePackageManager
$verifyHostHeader : VerifyHostHeader
$databasePermissionsCheck : PermissionsCheck

checkDatabaseConnectAction()

Check if database connect step needs to be shown

public checkDatabaseConnectAction() : ResponseInterface
Return values
ResponseInterface

checkDatabaseDataAction()

Check if initial data needs to be imported

public checkDatabaseDataAction() : ResponseInterface
Return values
ResponseInterface

checkDatabaseRequirementsAction()

Pre-check whether all requirements for the installed database driver and platform are fulfilled

public checkDatabaseRequirementsAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

checkDatabaseSelectAction()

Check if a database needs to be selected

public checkDatabaseSelectAction() : ResponseInterface
Return values
ResponseInterface

checkEnvironmentAndFoldersAction()

Check if "environment and folders" should be shown

public checkEnvironmentAndFoldersAction() : ResponseInterface
Return values
ResponseInterface

checkTrustedHostsPatternAction()

Check if trusted hosts pattern needs to be adjusted

public checkTrustedHostsPatternAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

executeAdjustTrustedHostsPatternAction()

Adjust trusted hosts pattern to '.*' if it does not match yet

public executeAdjustTrustedHostsPatternAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

executeDatabaseConnectAction()

Test database connect data

public executeDatabaseConnectAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

executeDatabaseDataAction()

Create main db layout

public executeDatabaseDataAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

executeDatabaseSelectAction()

Select / create and test a database

public executeDatabaseSelectAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

executeDefaultConfigurationAction()

Last step execution: clean up, remove FIRST_INSTALL file, .

public executeDefaultConfigurationAction(ServerRequestInterface $request) : ResponseInterface

..

Parameters
$request : ServerRequestInterface
Return values
ResponseInterface

executeEnvironmentAndFoldersAction()

Create main folder layout, LocalConfiguration, PackageStates

public executeEnvironmentAndFoldersAction() : ResponseInterface
Return values
ResponseInterface

executeSilentConfigurationUpdateAction()

Execute silent configuration update. May be called multiple times until success = true is returned.

public executeSilentConfigurationUpdateAction() : ResponseInterface
Return values
ResponseInterface

success = true if no change has been done

executeSilentTemplateFileUpdateAction()

Execute silent template files update. May be called multiple times until success = true is returned.

public executeSilentTemplateFileUpdateAction() : ResponseInterface
Return values
ResponseInterface

success = true if no change has been done

initAction()

Init action loads <head> with JS initiating further stuff

public initAction() : ResponseInterface
Return values
ResponseInterface

mainLayoutAction()

Main layout with progress bar, header

public mainLayoutAction() : ResponseInterface
Return values
ResponseInterface

showDatabaseConnectAction()

Show database connect step

public showDatabaseConnectAction() : ResponseInterface
Return values
ResponseInterface

showDatabaseDataAction()

Render "import initial data"

public showDatabaseDataAction() : ResponseInterface
Return values
ResponseInterface

showDatabaseSelectAction()

Render "select a database"

public showDatabaseSelectAction() : ResponseInterface
Return values
ResponseInterface

showDefaultConfigurationAction()

Show last "create empty site / install distribution"

public showDefaultConfigurationAction() : ResponseInterface
Return values
ResponseInterface

showEnvironmentAndFoldersAction()

Render "environment and folders"

public showEnvironmentAndFoldersAction() : ResponseInterface
Return values
ResponseInterface

showInstallerNotAvailableAction()

Render "FIRST_INSTALL file need to exist" view

public showInstallerNotAvailableAction() : ResponseInterface
Return values
ResponseInterface

checkExistingDatabase()

Checks whether an existing database on the default connection can be used for a TYPO3 installation. The database name is only persisted to the local configuration if the database is empty.

protected checkExistingDatabase(string $dbName) : FlashMessage
Parameters
$dbName : string

name of the database

Return values
FlashMessage

createNewDatabase()

Creates a new database on the default connection

protected createNewDatabase(string $dbName) : FlashMessage
Parameters
$dbName : string

name of database

Return values
FlashMessage

createSiteConfiguration()

Creates a site configuration with one language "English" which is the de-facto default language for TYPO3 in general.

protected createSiteConfiguration(string $identifier, int $rootPageId, ServerRequestInterface $request) : mixed
Parameters
$identifier : string
$rootPageId : int
$request : ServerRequestInterface
Tags
throws
NoSuchCacheException

getDatabaseConfigurationFromEnvironment()

Try to fetch db credentials from a .env file and see if connect works

protected getDatabaseConfigurationFromEnvironment() : array<string|int, mixed>
Return values
array<string|int, mixed>

Empty array if no file is found or connect is not successful, else working credentials

getDatabaseConfiguredMysqliSocket()

Returns configured socket, if set.

protected getDatabaseConfiguredMysqliSocket() : string
Return values
string

getDatabaseConfiguredPdoMysqlSocket()

Returns configured socket, if set.

protected getDatabaseConfiguredPdoMysqlSocket() : string
Return values
string

getDatabaseList()

Returns list of available databases (with access-check based on username/password)

protected getDatabaseList() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of available databases

getHashedPassword()

This function returns a salted hashed key for new backend user password and install tool password.

protected getHashedPassword(string $password) : string

This method is executed during installation before the preset did set up proper hash method selection in LocalConfiguration. So PasswordHashFactory is not usable at this point. We thus loop through the default hash mechanisms and select the first one that works. The preset calculation of step executeDefaultConfigurationAction() basically does the same later.

Parameters
$password : string

Plain text password

Tags
throws
LogicException

If no hash method has been found, should never happen PhpassPasswordHash is always available

Return values
string

Hashed password

importDatabaseData()

Create tables and import static rows

protected importDatabaseData() : array<string|int, FlashMessage>
Return values
array<string|int, FlashMessage>

initializeStandaloneView()

Helper method to initialize a standalone view instance.

protected initializeStandaloneView(string $templatePath) : StandaloneView
Parameters
$templatePath : string
Internal

param string $template

Return values
StandaloneView

isDatabaseConfigurationComplete()

Check LocalConfiguration.php for required database settings: - 'username' and 'password' are mandatory, but may be empty - if 'driver' is pdo_sqlite and 'path' is set, its ok, too

protected isDatabaseConfigurationComplete() : bool
Return values
bool

TRUE if required settings are present

isDatabaseConnectSuccessful()

Test connection with given credentials and return exception message if exception thrown

protected isDatabaseConnectSuccessful() : bool
Return values
bool

        
On this page

Search results