‪TYPO3CMS  11.5
TYPO3\CMS\Redirects\Service\SlugService Class Reference
Inheritance diagram for TYPO3\CMS\Redirects\Service\SlugService:

Public Member Functions

 __construct (Context $context, SiteFinder $siteFinder, PageRepository $pageRepository, LinkService $linkService, RedirectCacheService $redirectCacheService)
 
 rebuildSlugsForSlugChange (int $pageId, string $currentSlug, string $newSlug, CorrelationId $correlationId)
 

Public Attributes

const CORRELATION_ID_IDENTIFIER = '5d8e6e70'
 

Protected Member Functions

 initializeSettings (int $pageId)
 
 createCorrelationIds (int $pageId, CorrelationId $correlationId)
 
array createRedirect (string $originalSlug, int $pageId, int $languageId, int $pid)
 
 checkSubPages (array $currentPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage)
 
 resolveSubPages (int $id, int $languageUid)
 
 updateSlug (array $subPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage)
 
 persistNewSlug (int $uid, string $newSlug)
 
 sendNotification ()
 
 getRecordHistoryStore ()
 
 getQueryBuilderForPages ()
 
 enabledHook ()
 
 disableHook ()
 

Protected Attributes

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

Detailed Description

Due to some possible refactorings in TYPO3 v10

Definition at line 45 of file SlugService.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ checkSubPages()

TYPO3\CMS\Redirects\Service\SlugService::checkSubPages ( array  $currentPageRecord,
string  $oldSlugOfParentPage,
string  $newSlugOfParentPage 
)
protected

◆ createCorrelationIds()

◆ createRedirect()

array TYPO3\CMS\Redirects\Service\SlugService::createRedirect ( string  $originalSlug,
int  $pageId,
int  $languageId,
int  $pid 
)
protected

◆ disableHook()

TYPO3\CMS\Redirects\Service\SlugService::disableHook ( )
protected

Definition at line 350 of file SlugService.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\persistNewSlug().

◆ enabledHook()

TYPO3\CMS\Redirects\Service\SlugService::enabledHook ( )
protected

Definition at line 344 of file SlugService.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\persistNewSlug().

◆ getQueryBuilderForPages()

TYPO3\CMS\Redirects\Service\SlugService::getQueryBuilderForPages ( )
protected

◆ getRecordHistoryStore()

TYPO3\CMS\Redirects\Service\SlugService::getRecordHistoryStore ( )
protected

◆ initializeSettings()

TYPO3\CMS\Redirects\Service\SlugService::initializeSettings ( int  $pageId)
protected

◆ persistNewSlug()

TYPO3\CMS\Redirects\Service\SlugService::persistNewSlug ( int  $uid,
string  $newSlug 
)
protected

◆ rebuildSlugsForSlugChange()

◆ resolveSubPages()

TYPO3\CMS\Redirects\Service\SlugService::resolveSubPages ( int  $id,
int  $languageUid 
)
protected

◆ sendNotification()

◆ updateSlug()

TYPO3\CMS\Redirects\Service\SlugService::updateSlug ( array  $subPageRecord,
string  $oldSlugOfParentPage,
string  $newSlugOfParentPage 
)
protected

Update a slug by given record, old parent page slug and new parent page slug. In case no update is required, the method returns null else the new slug.

Definition at line 270 of file SlugService.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\Model\RecordStateFactory\forName(), and TYPO3\CMS\Redirects\Service\SlugService\persistNewSlug().

Referenced by TYPO3\CMS\Redirects\Service\SlugService\checkSubPages().

Member Data Documentation

◆ $autoCreateRedirects

bool TYPO3\CMS\Redirects\Service\SlugService::$autoCreateRedirects
protected

◆ $autoUpdateSlugs

bool TYPO3\CMS\Redirects\Service\SlugService::$autoUpdateSlugs
protected

Definition at line 82 of file SlugService.php.

◆ $context

Context TYPO3\CMS\Redirects\Service\SlugService::$context
protected

Definition at line 56 of file SlugService.php.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\__construct().

◆ $correlationIdRedirectCreation

CorrelationId string TYPO3\CMS\Redirects\Service\SlugService::$correlationIdRedirectCreation = ''
protected

◆ $correlationIdSlugUpdate

CorrelationId string TYPO3\CMS\Redirects\Service\SlugService::$correlationIdSlugUpdate = ''
protected

Definition at line 78 of file SlugService.php.

◆ $httpStatusCode

int TYPO3\CMS\Redirects\Service\SlugService::$httpStatusCode
protected

◆ $linkService

LinkService TYPO3\CMS\Redirects\Service\SlugService::$linkService
protected

Definition at line 70 of file SlugService.php.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\__construct().

◆ $pageRepository

PageRepository TYPO3\CMS\Redirects\Service\SlugService::$pageRepository
protected

Definition at line 68 of file SlugService.php.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\__construct().

◆ $redirectCacheService

RedirectCacheService TYPO3\CMS\Redirects\Service\SlugService::$redirectCacheService
protected

Definition at line 96 of file SlugService.php.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\__construct().

◆ $redirectTTL

int TYPO3\CMS\Redirects\Service\SlugService::$redirectTTL
protected

Definition at line 90 of file SlugService.php.

◆ $site

SiteInterface TYPO3\CMS\Redirects\Service\SlugService::$site
protected

Definition at line 60 of file SlugService.php.

◆ $siteFinder

SiteFinder TYPO3\CMS\Redirects\Service\SlugService::$siteFinder
protected

Definition at line 64 of file SlugService.php.

Referenced by TYPO3\CMS\Redirects\Service\SlugService\__construct().

◆ CORRELATION_ID_IDENTIFIER

const TYPO3\CMS\Redirects\Service\SlugService::CORRELATION_ID_IDENTIFIER = '5d8e6e70'

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

Definition at line 52 of file SlugService.php.

Referenced by TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook\isNestedHookInvocation(), and TYPO3\CMS\Redirects\Controller\RecordHistoryRollbackController\revertCorrelation().