SlugService implements LoggerAwareInterface uses LoggerAwareTrait
Due to some possible refactorings in TYPO3 v10+
Table of Contents
Interfaces
- LoggerAwareInterface
Constants
- CORRELATION_ID_IDENTIFIER = '5d8e6e70'
- `dechex(1569615472)` (similar to timestamps used with exceptions, but in hex)
Properties
- $autoCreateRedirects : bool
- $autoUpdateSlugs : bool
- $correlationIdRedirectCreation : CorrelationId|string
- $correlationIdSlugUpdate : CorrelationId|string
- $httpStatusCode : int
- $redirectTTL : int
Methods
- __construct() : mixed
- rebuildSlugsForSlugChange() : void
- checkSubPages() : array<string|int, string>
- createCorrelationIds() : void
- createRedirects() : array<string|int, string>
- disableHook() : void
- enabledHook() : void
- getBackendUser() : BackendUserAuthentication
- getQueryBuilderForPages() : QueryBuilder
- getRecordHistoryStore() : RecordHistoryStore
- initializeSettings() : void
- persistNewSlug() : void
- resolveSubPages() : array<string|int, mixed>
- sendNotification() : void
- updateSlug() : array<string|int, mixed>|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
final mixed
CORRELATION_ID_IDENTIFIER
= '5d8e6e70'
Properties
$autoCreateRedirects
protected
bool
$autoCreateRedirects
= false
$autoUpdateSlugs
protected
bool
$autoUpdateSlugs
= false
$correlationIdRedirectCreation
protected
CorrelationId|string
$correlationIdRedirectCreation
= ''
$correlationIdSlugUpdate
protected
CorrelationId|string
$correlationIdSlugUpdate
= ''
$httpStatusCode
protected
int
$httpStatusCode
= 307
$redirectTTL
protected
int
$redirectTTL
= 0
Methods
__construct()
public
__construct(Context $context, PageRepository $pageRepository, LinkService $linkService, RedirectCacheService $redirectCacheService, SlugRedirectChangeItemFactory $slugRedirectChangeItemFactory, EventDispatcherInterface $eventDispatcher, ConnectionPool $connectionPool) : mixed
Parameters
- $context : Context
- $pageRepository : PageRepository
- $linkService : LinkService
- $redirectCacheService : RedirectCacheService
- $slugRedirectChangeItemFactory : SlugRedirectChangeItemFactory
- $eventDispatcher : EventDispatcherInterface
- $connectionPool : ConnectionPool
rebuildSlugsForSlugChange()
public
rebuildSlugsForSlugChange(int $pageId, SlugRedirectChangeItem $changeItem, CorrelationId $correlationId) : void
Parameters
- $pageId : int
- $changeItem : SlugRedirectChangeItem
- $correlationId : CorrelationId
checkSubPages()
protected
checkSubPages(array<string|int, mixed> $currentPageRecord, SlugRedirectChangeItem $parentChangeItem) : array<string|int, string>
Parameters
- $currentPageRecord : array<string|int, mixed>
- $parentChangeItem : SlugRedirectChangeItem
Return values
array<string|int, string> —All unique source hosts for created redirects.
createCorrelationIds()
protected
createCorrelationIds(int $pageId, CorrelationId $correlationId) : void
Parameters
- $pageId : int
- $correlationId : CorrelationId
createRedirects()
protected
createRedirects(SlugRedirectChangeItem $changeItem, int $pageId, int $languageId) : array<string|int, string>
Parameters
- $changeItem : SlugRedirectChangeItem
- $pageId : int
- $languageId : int
Return values
array<string|int, string> —All unique source hosts for created redirects.
disableHook()
protected
disableHook() : void
enabledHook()
protected
enabledHook() : void
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetQueryBuilderForPages()
protected
getQueryBuilderForPages() : QueryBuilder
Return values
QueryBuildergetRecordHistoryStore()
protected
getRecordHistoryStore() : RecordHistoryStore
Return values
RecordHistoryStoreinitializeSettings()
protected
initializeSettings(Site $site) : void
Parameters
- $site : Site
persistNewSlug()
protected
persistNewSlug(int $uid, string $newSlug) : void
Parameters
- $uid : int
- $newSlug : string
resolveSubPages()
protected
resolveSubPages(int $id, int $languageUid) : array<string|int, mixed>
Parameters
- $id : int
- $languageUid : int
Return values
array<string|int, mixed>sendNotification()
protected
sendNotification() : void
updateSlug()
Update a slug by given record, old parent page slug and new parent page slug.
protected
updateSlug(array<string|int, mixed> $subPageRecord, SlugRedirectChangeItem $changeItem) : array<string|int, mixed>|null
In case no update is required, the method returns null else the new slug.
Parameters
- $subPageRecord : array<string|int, mixed>
- $changeItem : SlugRedirectChangeItem