hojaonline
11/3/2018 - 2:34 PM

Registering Hook Backend

Register your hook class in local configuration (ext_localconf.php):

` $GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][''] = 'NXS\NxsReferenzen\Hook\TCEmainHook';

$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][''] = 'NXS\NxsReferenzen\Hook\TCEmainHook';`

Ensure your hook class has namespace declaration: `

class TCEmainHook { public function processCmdmap_postProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) { echo '
';
var_dump($command);
echo '
';
die();
}
}

`