‪TYPO3CMS  10.4
TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook Class Reference

Public Member Functions

 __construct (SlugService $slugService)
 
 processDatamap_preProcessFieldArray (array $incomingFieldArray, string $table, $id, DataHandler $dataHandler)
 
 processDatamap_postProcessFieldArray (string $status, string $table, $id, array $fieldArray, DataHandler $dataHandler)
 

Protected Member Functions

bool isNestedHookInvocation (DataHandler $dataHandler)
 

Protected Attributes

SlugService $slugService
 
string[] $persistedSlugValues
 

Detailed Description

This class is a specific TYPO3 hook implementation and is not part of the Public TYPO3 API.

Definition at line 28 of file DataHandlerSlugUpdateHook.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook::__construct ( SlugService  $slugService)
Parameters
SlugService$slugService

Definition at line 44 of file DataHandlerSlugUpdateHook.php.

References TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook\$slugService.

Member Function Documentation

◆ isNestedHookInvocation()

bool TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook::isNestedHookInvocation ( DataHandler  $dataHandler)
protected

◆ processDatamap_postProcessFieldArray()

TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook::processDatamap_postProcessFieldArray ( string  $status,
string  $table,
  $id,
array  $fieldArray,
DataHandler  $dataHandler 
)

Acts on potential slug changes.

Hook processDatamap_postProcessFieldArray is executed after DataHandler::fillInFields which ensure access to pages.slug field and applies possible evaluations (eval => 'trim,...).

Parameters
string$status
string$table
string | int$id
array$fieldArray
DataHandler$dataHandler

Definition at line 85 of file DataHandlerSlugUpdateHook.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\getCorrelationId(), and TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook\isNestedHookInvocation().

◆ processDatamap_preProcessFieldArray()

TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook::processDatamap_preProcessFieldArray ( array  $incomingFieldArray,
string  $table,
  $id,
DataHandler  $dataHandler 
)

Collects slugs of persisted records before having been updated.

Parameters
array$incomingFieldArray
string$table
string | int$id‪(id could be string, for this reason no type hint)
DataHandler$dataHandler

Definition at line 57 of file DataHandlerSlugUpdateHook.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), and TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook\isNestedHookInvocation().

Member Data Documentation

◆ $persistedSlugValues

string [] TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook::$persistedSlugValues
protected

Persisted slug values per record UID e.g. ‘[13 => 'slug-a’, 14 => 'slug-x/example']`

Definition at line 39 of file DataHandlerSlugUpdateHook.php.

◆ $slugService

SlugService TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook::$slugService
protected