TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
DataHandlerHook Class Reference

Public Member Functions

 processCmdmap_postProcess ($command, $table, $id, $value,\TYPO3\CMS\Core\DataHandling\DataHandler $tcemain)
 
 processCmdmap_afterFinish (\TYPO3\CMS\Core\DataHandling\DataHandler $tcemainObj)
 

Protected Member Functions

 resetStageOfElements ($stageId)
 
 flushWorkspaceElements ($workspaceId)
 
 getTcaTables ()
 
 getTceMain ()
 
 flushWorkspaceCacheEntriesByWorkspaceId ($workspaceId)
 

Detailed Description

Tcemain service

Definition at line 22 of file workspaces/Classes/Hook/DataHandlerHook.php.

Member Function Documentation

flushWorkspaceCacheEntriesByWorkspaceId (   $workspaceId)
protected

Flushes the workspace cache for current workspace and for the virtual "all workspaces" too.

Parameters
int$workspaceIdThe workspace to be flushed in cache
Returns
void

Definition at line 135 of file workspaces/Classes/Hook/DataHandlerHook.php.

Referenced by DataHandlerHook\processCmdmap_afterFinish().

flushWorkspaceElements (   $workspaceId)
protected

Flushes elements of a particular workspace to avoid orphan records.

Parameters
int$workspaceIdThe workspace to be flushed
Returns
void

Definition at line 86 of file workspaces/Classes/Hook/DataHandlerHook.php.

References $GLOBALS, BackendUtility\deleteClause(), DataHandlerHook\getTcaTables(), DataHandlerHook\getTceMain(), BackendUtility\getWorkspaceWhereClause(), and BackendUtility\isTableWorkspaceEnabled().

Referenced by DataHandlerHook\processCmdmap_postProcess().

getTcaTables ( )
protected

Gets all defined TCA tables.

Returns
array

Definition at line 114 of file workspaces/Classes/Hook/DataHandlerHook.php.

References $GLOBALS.

Referenced by DataHandlerHook\flushWorkspaceElements(), and DataHandlerHook\resetStageOfElements().

getTceMain ( )
protected
processCmdmap_afterFinish ( \TYPO3\CMS\Core\DataHandling\DataHandler  $tcemainObj)

hook that is called AFTER all commands of the commandmap was executed

Parameters
\TYPO3\CMS\Core\DataHandling\DataHandler$tcemainObjreference to the main tcemain object
Returns
void

Definition at line 54 of file workspaces/Classes/Hook/DataHandlerHook.php.

References DataHandlerHook\flushWorkspaceCacheEntriesByWorkspaceId().

processCmdmap_postProcess (   $command,
  $table,
  $id,
  $value,
\TYPO3\CMS\Core\DataHandling\DataHandler  $tcemain 
)

In case a sys_workspace_stage record is deleted we do a hard reset for all existing records in that stage to avoid that any of these end up as orphan records.

Parameters
string$command
string$table
string$id
string$value
\TYPO3\CMS\Core\DataHandling\DataHandler$tcemain
Returns
void

Definition at line 36 of file workspaces/Classes/Hook/DataHandlerHook.php.

References elseif, DataHandlerHook\flushWorkspaceElements(), and DataHandlerHook\resetStageOfElements().

resetStageOfElements (   $stageId)
protected

In case a sys_workspace_stage record is deleted we do a hard reset for all existing records in that stage to avoid that any of these end up as orphan records.

Parameters
int$stageIdElements with this stage are resetted
Returns
void

Definition at line 67 of file workspaces/Classes/Hook/DataHandlerHook.php.

References $GLOBALS, BackendUtility\deleteClause(), DataHandlerHook\getTcaTables(), and BackendUtility\isTableWorkspaceEnabled().

Referenced by DataHandlerHook\processCmdmap_postProcess().