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
- $eventDispatcher : EventDispatcherInterface
- $httpStatusCode : int
- $linkService : LinkService
- $pageRepository : PageRepository
- $redirectCacheService : RedirectCacheService
- $redirectTTL : int
- $site : SiteInterface
- $siteFinder : SiteFinder
- $slugRedirectChangeItemFactory : SlugRedirectChangeItemFactory
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
mixed
CORRELATION_ID_IDENTIFIER
= '5d8e6e70'
Properties
$autoCreateRedirects
protected
bool
$autoCreateRedirects
$autoUpdateSlugs
protected
bool
$autoUpdateSlugs
$context read-only
protected
Context
$context
$correlationIdRedirectCreation
protected
CorrelationId|string
$correlationIdRedirectCreation
= ''
$correlationIdSlugUpdate
protected
CorrelationId|string
$correlationIdSlugUpdate
= ''
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$httpStatusCode
protected
int
$httpStatusCode
$linkService read-only
protected
LinkService
$linkService
$pageRepository read-only
protected
PageRepository
$pageRepository
$redirectCacheService read-only
protected
RedirectCacheService
$redirectCacheService
$redirectTTL
protected
int
$redirectTTL
$site
protected
SiteInterface
$site
$siteFinder read-only
protected
SiteFinder
$siteFinder
$slugRedirectChangeItemFactory read-only
protected
SlugRedirectChangeItemFactory
$slugRedirectChangeItemFactory
Methods
__construct()
public
__construct(Context $context, SiteFinder $siteFinder, PageRepository $pageRepository, LinkService $linkService, RedirectCacheService $redirectCacheService, SlugRedirectChangeItemFactory $slugRedirectChangeItemFactory, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $context : Context
- $siteFinder : SiteFinder
- $pageRepository : PageRepository
- $linkService : LinkService
- $redirectCacheService : RedirectCacheService
- $slugRedirectChangeItemFactory : SlugRedirectChangeItemFactory
- $eventDispatcher : EventDispatcherInterface
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