public function processDatamap_afterDatabaseOperations($status, $table, $uid, array $fields, DataHandler $tceMain)
    {
        if ($status === 'new') {
            // a newly created record, skip
            return;
        }

        if (Util::isDraftRecord($table, $uid)) {
            // skip workspaces: collect garbage only for LIVE workspace
            return;
        }

        $record = $this->getRecordWithFieldRelevantForGarbageCollection($table, $uid);

        // If no record could be found skip further processing
        if (empty($record)) {
            return;
        }

        $record = $this->tcaService->normalizeFrontendGroupField($table, $record);
        $isGarbage = $this->getIsGarbageRecord($table, $record);
        if (!$isGarbage) {
            return;
        }

        $this->collectGarbage($table, $uid);

        if ($table === 'pages') {
            $this->deleteSubpagesWhenExtendToSubpagesIsSet($table, $uid, $fields);
        }
    }
public function processDatamap_afterDatabaseOperations($status, $table, $uid, array $fields, DataHandler $tceMain)
    {
        if ($status === 'new') {
            // a newly created record, skip
            return;
        }

        if (Util::isDraftRecord($table, $uid)) {
            // skip workspaces: collect garbage only for LIVE workspace
            return;
        }

        $record = $this->getRecordWithFieldRelevantForGarbageCollection($table, $uid);

        // If no record could be found skip further processing
        if (empty($record)) {
            return;
        }

        $record = $this->tcaService->normalizeFrontendGroupField($table, $record);
        $isGarbage = $this->getIsGarbageRecord($table, $record);
        if (!$isGarbage) {
            return;
        }

        $this->collectGarbage($table, $uid);

        if ($table === 'pages') {
            $this->deleteSubpagesWhenExtendToSubpagesIsSet($table, $uid, $fields);
        }
    }
public function processDatamap_afterDatabaseOperations ( $ status , $ table , $ uid , array $ fields , DataHandler $ tceMain ) { if ( $ status === 'new' ) { // a newly created record, skip return ; } if ( Util :: isDraftRecord ( $ table , $ uid ) ) { // skip workspaces: collect garbage only for LIVE workspace return ; } $ record = $ this -> getRecordWithFieldRelevantForGarbageCollection ( $ table , $ uid ) ; // If no record could be found skip further processing if ( empty ( $ record ) ) { return ; } $ record = $ this -> tcaService -> normalizeFrontendGroupField ( $ table , $ record ) ; $ isGarbage = $ this -> getIsGarbageRecord ( $ table , $ record ) ; if ( ! $ isGarbage ) { return ; } $ this -> collectGarbage ( $ table , $ uid ) ; if ( $ table === 'pages' ) { $ this -> deleteSubpagesWhenExtendToSubpagesIsSet ( $ table , $ uid , $ fields ) ; } }
Hooks into TCE Main and watches all record updates. If a change is
detected that would remove the record from the website, we try to find
related documents and remove them from the index.

@param string $status Status of the current operation, 'new' or 'update'
@param string $table The table the record belongs to
@param mixed $uid The record's uid, [integer] or [string] (like 'NEW...')
@param array $fields The record's data, not used
@param DataHandler $tceMain TYPO3 Core Engine parent object, not used
Hooks into TCE Main and watches all record updates . If a change is detected that would remove the record from the website we try to find related documents and remove them from the index .