TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Workspaces\Hook\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 DataHandlerHook.php.

Member Function Documentation

◆ flushWorkspaceCacheEntriesByWorkspaceId()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::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 DataHandlerHook.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_afterFinish().

◆ flushWorkspaceElements()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::flushWorkspaceElements (   $workspaceId)
protected

◆ getTcaTables()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getTcaTables ( )
protected

Gets all defined TCA tables.

Returns
array

Definition at line 114 of file DataHandlerHook.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceElements(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\resetStageOfElements().

◆ getTceMain()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getTceMain ( )
protected

◆ processCmdmap_afterFinish()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::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 DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceCacheEntriesByWorkspaceId().

◆ processCmdmap_postProcess()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::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 DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceElements(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\resetStageOfElements().

◆ resetStageOfElements()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::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 DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getTcaTables(), TYPO3\CMS\Backend\Utility\BackendUtility\isTableWorkspaceEnabled(), and TYPO3\CMS\Workspaces\Service\StagesService\STAGE_EDIT_ID.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_postProcess().