PHP Class DmitryDulepov\Realurl\Hooks\DataHandler

Afficher le fichier Open project: dmitryd/typo3-realurl

Protected Properties

Свойство Type Description
$cache DmitryDulepov\Realurl\Cache\CacheInterface
$databaseConnection TYPO3\CMS\Dbal\Database\DatabaseConnection

Méthodes publiques

Méthode Description
__construct ( ) Initializes the class.
processCmdmap_deleteAction ( string $table, string | integer $id ) Clears path and URL caches if the page was deleted.
processCmdmap_postProcess ( string $command, string $table, integer $id ) Expires caches if the page was moved.
processDatamap_afterDatabaseOperations ( string $status, string $tableName, integer $recordId, array $databaseData, TYPO3\CMS\Core\DataHandling\DataHandler $dataHandler ) : void A DataHandler hook to expire old records.

Méthodes protégées

Méthode Description
clearAutoConfiguration ( string $tableName, array $databaseData ) Clears automatic configuration when necessary. Note: we do not check if it iss enabled. Even if now it is disabled, later it can be re-enabled and suddenly obsolete config will be used. So we clear always.
clearUrlCacheForAliasChanges ( string $tableName, integer $recordId ) : void Clears URL cache if it is found in the alias table.
expireCache ( string $status, string $tableName, string | integer $recordId, array $databaseData ) : void Expires cache if necessary when the record changes. For 'pages' we expire cache only if the page was modified. For 'pages_language_overlay' we do it on creation of a new translation too. For reasons see https://github.com/dmitryd/typo3-realurl/issues/313#issuecomment-257268851
expireCachesForPageAndSubpages ( integer $pageId, integer $languageId, integer $level ) : void Expires cache for the page and subpages.

Method Details

__construct() public méthode

Initializes the class.
public __construct ( )

clearAutoConfiguration() protected méthode

Clears automatic configuration when necessary. Note: we do not check if it iss enabled. Even if now it is disabled, later it can be re-enabled and suddenly obsolete config will be used. So we clear always.
protected clearAutoConfiguration ( string $tableName, array $databaseData )
$tableName string
$databaseData array

clearUrlCacheForAliasChanges() protected méthode

Clears URL cache if it is found in the alias table.
protected clearUrlCacheForAliasChanges ( string $tableName, integer $recordId ) : void
$tableName string
$recordId integer
Résultat void

expireCache() protected méthode

Expires cache if necessary when the record changes. For 'pages' we expire cache only if the page was modified. For 'pages_language_overlay' we do it on creation of a new translation too. For reasons see https://github.com/dmitryd/typo3-realurl/issues/313#issuecomment-257268851
protected expireCache ( string $status, string $tableName, string | integer $recordId, array $databaseData ) : void
$status string
$tableName string
$recordId string | integer
$databaseData array
Résultat void

expireCachesForPageAndSubpages() protected méthode

Expires cache for the page and subpages.
protected expireCachesForPageAndSubpages ( integer $pageId, integer $languageId, integer $level ) : void
$pageId integer
$languageId integer
$level integer
Résultat void

processCmdmap_deleteAction() public méthode

Clears path and URL caches if the page was deleted.
public processCmdmap_deleteAction ( string $table, string | integer $id )
$table string
$id string | integer

processCmdmap_postProcess() public méthode

Expires caches if the page was moved.
public processCmdmap_postProcess ( string $command, string $table, integer $id )
$command string
$table string
$id integer

processDatamap_afterDatabaseOperations() public méthode

A DataHandler hook to expire old records.
public processDatamap_afterDatabaseOperations ( string $status, string $tableName, integer $recordId, array $databaseData, TYPO3\CMS\Core\DataHandling\DataHandler $dataHandler ) : void
$status string 'new' (ignoring) or 'update'
$tableName string
$recordId integer
$databaseData array
$dataHandler TYPO3\CMS\Core\DataHandling\DataHandler
Résultat void

Property Details

$cache protected_oe property

protected CacheInterface,DmitryDulepov\Realurl\Cache $cache
Résultat DmitryDulepov\Realurl\Cache\CacheInterface

$databaseConnection protected_oe property

protected DatabaseConnection,TYPO3\CMS\Dbal\Database $databaseConnection
Résultat TYPO3\CMS\Dbal\Database\DatabaseConnection