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
- $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<string|int, mixed>
- disableHook() : void
- enabledHook() : void
- getQueryBuilderForPages() : QueryBuilder
- getRecordHistoryStore() : RecordHistoryStore
- initializeSettings() : void
- persistNewSlug() : void
- resolveSubPages() : array<string|int, mixed>
- 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
$context
protected
Context
$context
$correlationIdRedirectCreation
protected
CorrelationId|string
$correlationIdRedirectCreation
= ''
$correlationIdSlugUpdate
protected
CorrelationId|string
$correlationIdSlugUpdate
= ''
$httpStatusCode
protected
int
$httpStatusCode
$linkService
protected
LinkService
$linkService
$pageRepository
protected
PageRepository
$pageRepository
$redirectCacheService
protected
RedirectCacheService
$redirectCacheService
$redirectTTL
protected
int
$redirectTTL
$site
protected
SiteInterface
$site
$siteFinder
protected
SiteFinder
$siteFinder
Methods
__construct()
public
__construct(Context $context, SiteFinder $siteFinder, PageRepository $pageRepository, LinkService $linkService, RedirectCacheService $redirectCacheService) : mixed
Parameters
- $context : Context
- $siteFinder : SiteFinder
- $pageRepository : PageRepository
- $linkService : LinkService
- $redirectCacheService : RedirectCacheService
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<string|int, mixed> $currentPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage) : void
Parameters
- $currentPageRecord : array<string|int, mixed>
- $oldSlugOfParentPage : string
- $newSlugOfParentPage : string
createCorrelationIds()
protected
createCorrelationIds(int $pageId, CorrelationId $correlationId) : void
Parameters
- $pageId : int
- $correlationId : CorrelationId
createRedirect()
protected
createRedirect(string $originalSlug, int $pageId, int $languageId, int $pid) : array<string|int, mixed>
Parameters
- $originalSlug : string
- $pageId : int
- $languageId : int
- $pid : int
Return values
array<string|int, mixed> —The created redirect record
disableHook()
protected
disableHook() : void
enabledHook()
protected
enabledHook() : void
getQueryBuilderForPages()
protected
getQueryBuilderForPages() : QueryBuilder
Return values
QueryBuildergetRecordHistoryStore()
protected
getRecordHistoryStore() : RecordHistoryStore
Return values
RecordHistoryStoreinitializeSettings()
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<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, string $oldSlugOfParentPage, string $newSlugOfParentPage) : string|null
In case no update is required, the method returns null else the new slug.
Parameters
- $subPageRecord : array<string|int, mixed>
- $oldSlugOfParentPage : string
- $newSlugOfParentPage : string