[FEATURE] Add a hook to pre-process TSFE determineId()
authorIngo Renner <ingo@typo3.org>
Sat, 7 Jul 2012 15:16:21 +0000 (17:16 +0200)
committerIngmar Schlecht <ingmar@typo3.org>
Sat, 7 Jul 2012 18:17:08 +0000 (20:17 +0200)
Just like there is a hook to post-process determineID(), there
should be a hook to pre-process the determination of the page ID.

This should be useful to extract f.e. page preview handling.

Change-Id: I17a2d15c5c7488a4ead5b88cfeb7a365cb124be1
Resolves: #38725
Releases: 6.0
Reviewed-on: http://review.typo3.org/12693
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Ingmar Schlecht
Tested-by: Ingmar Schlecht
typo3/sysext/cms/tslib/class.tslib_fe.php

index fd2b04c..7cfbec8 100644 (file)
@@ -742,6 +742,14 @@ class tslib_fe {
         */
        function determineId() {
 
+                       // Call pre processing function for id determination
+               if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'])) {
+                       foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'] as $functionReference) {
+                               $parameters = array('parentObject' => $this);
+                               t3lib_div::callUserFunction($functionReference, $parameters, $this);
+                       }
+               }
+
                        // Getting ARG-v values if some
                $this->setIDfromArgV();