IndexedSearchCTypeMigration

final class \TYPO3\CMS\IndexedSearch\Upgrades\IndexedSearchCTypeMigration

Extends
AbstractListTypeToCTypeUpdate

This class can be extended by 3rd party extensions to easily add a custom `list_type` to `CType` update for deprecated "plugin" content element usages.

Tags

since
13.0

Attributes

#[UpgradeWizard]
'indexedSearchCTypeMigration'

Table of Contents

Constants

TABLE_BACKEND_USER_GROUPS  : mixed = 'be_groups'
TABLE_CONTENT  : mixed = 'tt_content'

Methods

__construct()  : mixed
executeUpdate()  : bool
Execute the update
getDescription()  : string
Return the description for this wizard
getPrerequisites()  : string[]
Returns an array of class names of Prerequisite classes
getTitle()  : string
Return the speaking name of this wizard
updateNecessary()  : bool
Is an update necessary?
columnsExistInBackendUserGroupsTable()  : bool
columnsExistInContentTable()  : bool
getBackendUserGroupsToUpdate()  : array
getContentElementsToUpdate()  : array
getListTypeToCTypeMapping()  : array<string|int, mixed>
This must return an array containing the "list_type" to "CType" mapping.
hasBackendUserGroupsToUpdate()  : bool
hasContentElementsToUpdate()  : bool
hasNoLegacyBackendGroupsExplicitAllowDenyConfiguration()  : bool
Returns true, if no legacy explicit_allowdeny be_groups configuration is found.
updateBackendUserGroups()  : void
updateContentElements()  : void

Constants

TABLE_BACKEND_USER_GROUPS

protected mixed TABLE_BACKEND_USER_GROUPS = 'be_groups'

TABLE_CONTENT

protected mixed TABLE_CONTENT = 'tt_content'

Methods

executeUpdate()

Execute the update

public executeUpdate() : bool

Called when a wizard reports that an update is necessary

Return values

bool

getDescription()

Return the description for this wizard

public getDescription() : string

Return values

string

getPrerequisites()

Returns an array of class names of Prerequisite classes

public getPrerequisites() : string[]

This way a wizard can define dependencies like "database up-to-date" or "reference index updated"

Return values

string[]

getTitle()

Return the speaking name of this wizard

public getTitle() : string

Return values

string

updateNecessary()

Is an update necessary?

public updateNecessary() : bool

Is used to determine whether a wizard needs to be run. Check if data for migration exists.

Return values

bool

columnsExistInBackendUserGroupsTable()

protected columnsExistInBackendUserGroupsTable() : bool

Return values

bool

columnsExistInContentTable()

protected columnsExistInContentTable() : bool

Return values

bool

getBackendUserGroupsToUpdate()

protected getBackendUserGroupsToUpdate(string $listType) : array

Parameters

$listType : string

Return values

array

getContentElementsToUpdate()

protected getContentElementsToUpdate(string $listType) : array

Parameters

$listType : string

Return values

array

getListTypeToCTypeMapping()

This must return an array containing the "list_type" to "CType" mapping.

protected getListTypeToCTypeMapping() : array<string|int, mixed>

The array key is the exact value of corresponding "tt_content.list_type" DB records, the array value is the new "CType" value. not plugin

Example:

[ 'pi_plugin1' => 'pi_plugin1', 'pi_plugin2' => 'new_content_element', ]

Note that string keys with integer values like '4' will be treated as INT by PHP internally, which is why string-casting is performed later on.

Return values

array<string|int, mixed>

hasBackendUserGroupsToUpdate()

protected hasBackendUserGroupsToUpdate() : bool

Return values

bool

hasContentElementsToUpdate()

protected hasContentElementsToUpdate() : bool

Return values

bool

hasNoLegacyBackendGroupsExplicitAllowDenyConfiguration()

Returns true, if no legacy explicit_allowdeny be_groups configuration is found.

protected hasNoLegacyBackendGroupsExplicitAllowDenyConfiguration() : bool

Return values

bool

updateBackendUserGroups()

protected updateBackendUserGroups() : void

updateContentElements()

protected updateContentElements() : void
On this page