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() : array<string|int, mixed>
- createSiteConfiguration() : void
- Creates a site configuration with one language "English" which is the de-facto default language for TYPO3 in general.
- createSysTemplateRecord() : void
- Creates a sys_template record with basic PAGE rendering.
- 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.
- getDefaultSiteSetDependencies() : array<string|int, string>
- Returns the default site set dependencies based on installed packages. If the default theme is installed, it will be used. Otherwise, falls back to fluid_styled_content.
- hasDefaultTheme() : bool
- Check if the default theme is available.
- initializeDefaultThemeContent() : void
- prepareSystemSettings() : void
- setInstallToolPassword() : bool
- setSiteName() : bool
- writeSiteSetupTypoScript() : bool
- Writes a setup.typoscript file to the site configuration directory with basic PAGE rendering.
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()
public
createSite() : array<string|int, mixed>
Return values
array<string|int, mixed>createSiteConfiguration()
Creates a site configuration with one language "English" which is the de-facto default language for TYPO3 in general.
public
createSiteConfiguration(string $identifier, int $rootPageId, string $siteUrl[, array<string|int, string> $dependencies = [] ]) : void
Parameters
- $identifier : string
- $rootPageId : int
- $siteUrl : string
- $dependencies : array<string|int, string> = []
-
Site set identifiers to add as dependencies
Tags
createSysTemplateRecord()
Creates a sys_template record with basic PAGE rendering.
public
createSysTemplateRecord(mixed $pageUid) : void
Parameters
- $pageUid : mixed
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 = ''
getDefaultSiteSetDependencies()
Returns the default site set dependencies based on installed packages. If the default theme is installed, it will be used. Otherwise, falls back to fluid_styled_content.
public
getDefaultSiteSetDependencies() : array<string|int, string>
Tags
Return values
array<string|int, string> —Site set identifiers
hasDefaultTheme()
Check if the default theme is available.
public
hasDefaultTheme() : bool
Return values
boolinitializeDefaultThemeContent()
public
initializeDefaultThemeContent(string $pageId, mixed $contentId) : void
Parameters
- $pageId : string
- $contentId : mixed
Tags
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
Return values
boolwriteSiteSetupTypoScript()
Writes a setup.typoscript file to the site configuration directory with basic PAGE rendering.
public
writeSiteSetupTypoScript(string $siteIdentifier) : bool
Parameters
- $siteIdentifier : string