SetupService
Service class helping to manage parts of the setup process (set configuration, create backend user, create a basic site, create default backend groups, etc.)
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Methods
- __construct() : mixed
- 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() : array<string, array{packageKey: string, title: string, description: string}>
- Returns all available packages that ship initialisation data (data.xml or data.t3d) which can be imported during installation.
- importDistributionData() : void
- Import a distribution's initialisation data (pages, content elements, files) using the impexp import mechanism. Requires a fully booted container because the import relies on TCA, DataHandler and other runtime services.
- prepareSystemSettings() : void
- setInstallToolPassword() : bool
- setSiteName() : bool
Methods
__construct()
public
__construct(ConfigurationManager $configurationManager, SiteWriter $siteWriter, YamlFileLoader $yamlFileLoader, FailsafePackageManager $packageManager) : mixed
Parameters
- $configurationManager : ConfigurationManager
- $siteWriter : SiteWriter
- $yamlFileLoader : YamlFileLoader
- $packageManager : FailsafePackageManager
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>createDirectoryStructure()
public
createDirectoryStructure(WebserverType $webserverType) : array<string|int, FlashMessage>
Parameters
- $webserverType : WebserverType
Return values
array<string|int, FlashMessage>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
intcreateUser()
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 be imported during installation.
public
getAvailableDistributions() : array<string, array{packageKey: string, title: string, description: string}>
Return values
array<string, array{packageKey: string, title: string, description: string}> —Keyed by package key
importDistributionData()
Import a distribution's initialisation data (pages, content elements, files) using the impexp import mechanism. Requires a fully booted container because the import relies on TCA, DataHandler and other runtime services.
public
importDistributionData(ContainerInterface $container, string $packageKey) : void
Parameters
- $container : ContainerInterface
-
The fully booted (non-failsafe) DI container
- $packageKey : string
-
The extension key of the distribution to import
prepareSystemSettings()
public
prepareSystemSettings([bool $forceOverwrite = false ]) : void
Parameters
- $forceOverwrite : bool = false
Tags
setInstallToolPassword()
public
setInstallToolPassword(string $password) : bool
Parameters
- $password : string
Return values
boolsetSiteName()
public
setSiteName(string $name) : bool
Parameters
- $name : string