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

Public Member Functions

 __construct (Context $context, LanguageService $languageService, SiteFinder $siteFinder, PageRepository $pageRepository, LinkService $linkService)
 
 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)
 
 createRedirect (string $originalSlug, int $pageId, int $languageId, int $pid)
 
 checkSubPages (array $currentPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage)
 
 resolveSubPages (int $id, int $languageUid)
 
string null updateSlug (array $subPageRecord, string $oldSlugOfParentPage, string $newSlugOfParentPage)
 
 persistNewSlug (int $uid, string $newSlug)
 
 sendNotification ()
 
 getRecordHistoryStore ()
 
 getQueryBuilderForPages ()
 
 enabledHook ()
 
 disableHook ()
 

Protected Attributes

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

Detailed Description

Due to some possible refactorings in TYPO3 v10

Definition at line 47 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()

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 354 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 348 of file SlugService.php.

References $GLOBALS.

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

◆ getQueryBuilderForPages()

◆ 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()

string null 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.

Parameters
array$subPageRecord
string$oldSlugOfParentPage
string$newSlugOfParentPage
Returns
‪string|null

Definition at line 267 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 90 of file SlugService.php.

◆ $context

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

Definition at line 58 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

◆ $httpStatusCode

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

◆ $languageService

LanguageService TYPO3\CMS\Redirects\Service\SlugService::$languageService
protected

Definition at line 62 of file SlugService.php.

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

◆ $linkService

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

Definition at line 78 of file SlugService.php.

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

◆ $pageRepository

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

Definition at line 74 of file SlugService.php.

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

◆ $redirectTTL

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

Definition at line 98 of file SlugService.php.

◆ $site

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

Definition at line 66 of file SlugService.php.

◆ $siteFinder

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

Definition at line 70 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 54 of file SlugService.php.

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