SetupService

Read onlyYes

Service class helping to manage parts of the setup process (set configuration, create backend user, create a basic site, create default backend groups, etc.)

Internal

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

Tags
phpstan-type

Distribution array{ packageKey: string, title: string, description: string, isFramework: bool }

phpstan-type

SplitDistributions array{ inactive: array<string, Distribution>, active: array<string, Distribution> }

Table of Contents

Methods

__construct()  : mixed
activateDistributionPackage()  : void
Activate the selected distribution package in case it isn't already and make sure import export package is installed as well
createBackendUserGroups()  : array<string|int, string>
Initializes backend user group presets. Currently hard-coded to editor and advanced editor.
createDirectoryStructure()  : array<string|int, FlashMessage>
createSite()  : int
Create a root page and site configuration with appropriate site set dependencies, if available
createUser()  : void
Create a backend user with maintainer and admin flag set by default, because the initial user always requires these flags to grant full permissions to the system.
getAvailableDistributions()  : SplitDistributions
Returns all available packages that ship initialisation data (data.xml or data.t3d) which can (or will) be imported during installation.
prepareSystemSettings()  : void
setInstallToolPassword()  : bool
setSiteName()  : bool
setupExtensions()  : void

Methods

activateDistributionPackage()

Activate the selected distribution package in case it isn't already and make sure import export package is installed as well

public activateDistributionPackage(string $packageKey) : void
Parameters
$packageKey : string

createBackendUserGroups()

Initializes backend user group presets. Currently hard-coded to editor and advanced editor.

public createBackendUserGroups([bool $createEditor = true ][, bool $createAdvancedEditor = true ][, bool $force = false ]) : array<string|int, string>

When more backend user group presets are added, please refactor (maybe DTO).

Parameters
$createEditor : bool = true
$createAdvancedEditor : bool = true
$force : bool = false
Return values
array<string|int, string>

createSite()

Create a root page and site configuration with appropriate site set dependencies, if available

public createSite(string $siteIdentifier, string $siteUrl) : int
Parameters
$siteIdentifier : string
$siteUrl : string
Return values
int

createUser()

Create a backend user with maintainer and admin flag set by default, because the initial user always requires these flags to grant full permissions to the system.

public createUser(string $username, string $password[, string $email = '' ]) : void
Parameters
$username : string
$password : string
$email : string = ''

getAvailableDistributions()

Returns all available packages that ship initialisation data (data.xml or data.t3d) which can (or will) be imported during installation.

public getAvailableDistributions() : SplitDistributions
Return values
SplitDistributions

setInstallToolPassword()

public setInstallToolPassword(string $password) : bool
Parameters
$password : string
Return values
bool

setSiteName()

public setSiteName(string $name) : bool
Parameters
$name : string
Return values
bool

setupExtensions()

public setupExtensions(ContainerInterface $container) : void
Parameters
$container : ContainerInterface

        
On this page

Search results