![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct () | |
processDatamap_afterDatabaseOperations ($status, $table, $recordId, array $updatedFields, DataHandler $tceMain) | |
processCmdmap_postProcess ($command, $table, $recordId, $commandValue, DataHandler $tceMain) | |
moveRecord_firstElementPostProcess ($table, $recordId, $destinationPid, array $movedRecord, array $updatedFields, DataHandler $tceMain) | |
moveRecord_afterAnotherElementPostProcess ($table, $recordId, $destinationPid, $originalDestinationPid, array $movedRecord, array $updatedFields, DataHandler $tceMain) | |
Protected Member Functions | |
requiresUpdate (array $updatedFields) | |
processClearCacheActions ($affectedPage, $affectedParentPage, $updatedFields, array $actions) | |
clearCacheForAllParents ($affectedParentPage) | |
clearCacheWhereUidInTreelist ($affectedPage) | |
setCacheExpiration ($affectedPage, $expirationTime) | |
removeExpiredCacheEntries () | |
determineClearCacheActions ($status, $updatedFields) | |
getDatabaseConnection () | |
Private Attributes | |
$updateRequiringFields | |
Class that hooks into TCEmain and listens for updates to pages to update the treelist cache
Definition at line 25 of file TreelistCacheUpdateHooks.php.
__construct | ( | ) |
Constructor, adds update requiring fields to the default ones
Definition at line 42 of file TreelistCacheUpdateHooks.php.
References $GLOBALS, and GeneralUtility\trimExplode().
|
protected |
Clears the treelist cache for all parents of a changed page. gets called after creating a new page and after moving a page
int | $affectedParentPage | Parent page id of the changed page, the page to start clearing from |
Definition at line 243 of file TreelistCacheUpdateHooks.php.
References BackendUtility\BEgetRootLine(), and TreelistCacheUpdateHooks\getDatabaseConnection().
Referenced by TreelistCacheUpdateHooks\processClearCacheActions().
|
protected |
Clears the treelist cache for all pages where the affected page is found in the treelist
int | $affectedPage | ID of the changed page |
Definition at line 265 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\getDatabaseConnection().
Referenced by TreelistCacheUpdateHooks\processClearCacheActions().
|
protected |
Determines what happened to the page record, this is necessary to clear as less cache entries as needed later
string | $status | TCEmain operation status, either 'new' or 'update' |
array | $updatedFields | Array of updated fields |
Definition at line 303 of file TreelistCacheUpdateHooks.php.
References $GLOBALS, and elseif.
Referenced by TreelistCacheUpdateHooks\moveRecord_afterAnotherElementPostProcess(), TreelistCacheUpdateHooks\moveRecord_firstElementPostProcess(), TreelistCacheUpdateHooks\processCmdmap_postProcess(), and TreelistCacheUpdateHooks\processDatamap_afterDatabaseOperations().
|
protected |
Returns the database connection
Definition at line 358 of file TreelistCacheUpdateHooks.php.
References $GLOBALS.
Referenced by TreelistCacheUpdateHooks\clearCacheForAllParents(), TreelistCacheUpdateHooks\clearCacheWhereUidInTreelist(), TreelistCacheUpdateHooks\removeExpiredCacheEntries(), and TreelistCacheUpdateHooks\setCacheExpiration().
moveRecord_afterAnotherElementPostProcess | ( | $table, | |
$recordId, | |||
$destinationPid, | |||
$originalDestinationPid, | |||
array | $movedRecord, | ||
array | $updatedFields, | ||
DataHandler | $tceMain | ||
) |
Waits for TCEmain commands and looks for moved pages, if found further changes take place to determine whether the cache needs to be updated
string | $table | Table name of the moved record |
int | $recordId | The record's uid |
int | $destinationPid | The record's destination page id |
int | $originalDestinationPid | (negative) page id th page has been moved after |
array | $movedRecord | The record that moved |
array | $updatedFields | Array of changed fields |
DataHandler | $tceMain | TCEmain parent object |
Definition at line 168 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\determineClearCacheActions(), TreelistCacheUpdateHooks\processClearCacheActions(), and TreelistCacheUpdateHooks\requiresUpdate().
moveRecord_firstElementPostProcess | ( | $table, | |
$recordId, | |||
$destinationPid, | |||
array | $movedRecord, | ||
array | $updatedFields, | ||
DataHandler | $tceMain | ||
) |
waits for TCEmain commands and looks for moved pages, if found further changes take place to determine whether the cache needs to be updated
string | $table | Table name of the moved record |
int | $recordId | The record's uid |
int | $destinationPid | The record's destination page id |
array | $movedRecord | The record that moved |
array | $updatedFields | Array of changed fields |
DataHandler | $tceMain | TCEmain parent object |
Definition at line 141 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\determineClearCacheActions(), TreelistCacheUpdateHooks\processClearCacheActions(), and TreelistCacheUpdateHooks\requiresUpdate().
|
protected |
Calls the cache maintainance functions according to the determined actions
int | $affectedPage | uid of the affected page |
int | $affectedParentPage | parent uid of the affected page |
array | $updatedFields | Array of updated fields and their new values |
array | $actions | Array of actions to carry out |
Definition at line 210 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\clearCacheForAllParents(), TreelistCacheUpdateHooks\clearCacheWhereUidInTreelist(), TreelistCacheUpdateHooks\removeExpiredCacheEntries(), and TreelistCacheUpdateHooks\setCacheExpiration().
Referenced by TreelistCacheUpdateHooks\moveRecord_afterAnotherElementPostProcess(), TreelistCacheUpdateHooks\moveRecord_firstElementPostProcess(), TreelistCacheUpdateHooks\processCmdmap_postProcess(), and TreelistCacheUpdateHooks\processDatamap_afterDatabaseOperations().
processCmdmap_postProcess | ( | $command, | |
$table, | |||
$recordId, | |||
$commandValue, | |||
DataHandler | $tceMain | ||
) |
Waits for DataHandler commands and looks for deleted pages or swapped pages, if found further changes take place to determine whether the cache needs to be updated
string | $command | The TCE command |
string | $table | The record's table |
int | $recordId | The record's uid |
array | $commandValue | The commands value, typically an array with more detailed command information |
DataHandler | $tceMain | The TCEmain parent object |
Definition at line 104 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\determineClearCacheActions(), BackendUtility\getRecord(), and TreelistCacheUpdateHooks\processClearCacheActions().
processDatamap_afterDatabaseOperations | ( | $status, | |
$table, | |||
$recordId, | |||
array | $updatedFields, | ||
DataHandler | $tceMain | ||
) |
waits for TCEmain commands and looks for changed pages, if found further changes take place to determine whether the cache needs to be updated
string | $status | TCEmain operation status, either 'new' or 'update' |
string | $table | The DB table the operation was carried out on |
mixed | $recordId | The record's uid for update records, a string to look the record's uid up after it has been created |
array | $updatedFields | Array of changed fiels and their new values |
DataHandler | $tceMain | TCEmain parent object |
Definition at line 70 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\determineClearCacheActions(), elseif, BackendUtility\getRecord(), TreelistCacheUpdateHooks\processClearCacheActions(), and TreelistCacheUpdateHooks\requiresUpdate().
|
protected |
Removes all expired treelist cache entries
Definition at line 290 of file TreelistCacheUpdateHooks.php.
References $GLOBALS, and TreelistCacheUpdateHooks\getDatabaseConnection().
Referenced by TreelistCacheUpdateHooks\processClearCacheActions().
|
protected |
Checks whether the change requires an update of the treelist cache
array | $updatedFields | Array of changed fields |
Definition at line 188 of file TreelistCacheUpdateHooks.php.
Referenced by TreelistCacheUpdateHooks\moveRecord_afterAnotherElementPostProcess(), TreelistCacheUpdateHooks\moveRecord_firstElementPostProcess(), and TreelistCacheUpdateHooks\processDatamap_afterDatabaseOperations().
|
protected |
Sets an expiration time for all cache entries having the changed page in the treelist.
int | $affectedPage | Uid of the changed page |
int | $expirationTime |
Definition at line 278 of file TreelistCacheUpdateHooks.php.
References TreelistCacheUpdateHooks\getDatabaseConnection().
Referenced by TreelistCacheUpdateHooks\processClearCacheActions().
|
private |
Definition at line 33 of file TreelistCacheUpdateHooks.php.