SlugService

class \TYPO3\CMS\Redirects\Service\SlugService

Implements
LoggerAwareInterface
Uses
LoggerAwareTrait

Table of Contents

Interfaces

LoggerAwareInterface

Constants

CORRELATION_ID_IDENTIFIER  : mixed = '5d8e6e70'
`dechex(1569615472)` (similar to timestamps used with exceptions, but in hex)

Properties

$autoCreateRedirects  : bool
$autoUpdateSlugs  : bool
$context  : Context
$correlationIdRedirectCreation  : CorrelationId|string
$correlationIdSlugUpdate  : CorrelationId|string
$httpStatusCode  : int
$linkService  : LinkService
$pageRepository  : PageRepository
$redirectCacheService  : RedirectCacheService
$redirectTTL  : int
$site  : SiteInterface
$siteFinder  : SiteFinder

Methods

__construct()  : mixed
rebuildSlugsForSlugChange()  : void
checkSubPages()  : void
createCorrelationIds()  : void
createRedirect()  : array
disableHook()  : void
enabledHook()  : void
getQueryBuilderForPages()  : QueryBuilder
getRecordHistoryStore()  : RecordHistoryStore
initializeSettings()  : void
persistNewSlug()  : void
resolveSubPages()  : array
sendNotification()  : void
updateSlug()  : string|null
Update a slug by given record, old parent page slug and new parent page slug.

Constants

CORRELATION_ID_IDENTIFIER

`dechex(1569615472)` (similar to timestamps used with exceptions, but in hex)

public mixed CORRELATION_ID_IDENTIFIER = '5d8e6e70'

Properties

$autoCreateRedirects

protected bool $autoCreateRedirects

$autoUpdateSlugs

protected bool $autoUpdateSlugs

$httpStatusCode

protected int $httpStatusCode

Methods

rebuildSlugsForSlugChange()

public rebuildSlugsForSlugChange(int $pageId, string $currentSlug, string $newSlug, CorrelationId $correlationId) : void

Parameters

$pageId : int
$currentSlug : string
$newSlug : string
$correlationId : CorrelationId

checkSubPages()

protected checkSubPages(array $currentPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage) : void

Parameters

$currentPageRecord : array
$oldSlugOfParentPage : string
$newSlugOfParentPage : string

createRedirect()

protected createRedirect(string $originalSlug, int $pageId, int $languageId, int $pid) : array

Parameters

$originalSlug : string
$pageId : int
$languageId : int
$pid : int

Return values

array —

The created redirect record

disableHook()

protected disableHook() : void

enabledHook()

protected enabledHook() : void

initializeSettings()

protected initializeSettings(int $pageId) : void

Parameters

$pageId : int

persistNewSlug()

protected persistNewSlug(int $uid, string $newSlug) : void

Parameters

$uid : int
$newSlug : string

resolveSubPages()

protected resolveSubPages(int $id, int $languageUid) : array

Parameters

$id : int
$languageUid : int

Return values

array

sendNotification()

protected sendNotification() : void

updateSlug()

Update a slug by given record, old parent page slug and new parent page slug.

protected updateSlug(array $subPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage) : string|null

In case no update is required, the method returns null else the new slug.

Parameters

$subPageRecord : array
$oldSlugOfParentPage : string
$newSlugOfParentPage : string

Return values

string|null
On this page