[FEATURE] Add possibility for improved detail view
authorFrancois Suter <francois@typo3.org>
Tue, 28 Jun 2011 16:00:34 +0000 (18:00 +0200)
committerFrancois Suter <francois@typo3.org>
Tue, 28 Jun 2011 16:39:02 +0000 (18:39 +0200)
The current row detail view in the Workspaces module is rather limited
and there's no entry point to change it. Adding a hook makes it
possible to manipulate, and thus enhance, that view.

With http://forge.typo3.org/issues/27442 the hook will now receive
all relevant information.

Change-Id: Ibe15ae0f5a57ecd3988e62b10b58a30976ea3f18
Resolves: #12868
Releases: 4.5, 4.6

typo3/sysext/workspaces/Classes/ExtDirect/Server.php

index 0d2b9c2..3c62990 100644 (file)
@@ -145,6 +145,14 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
                                }
                        }
                }
+                       // Hook for modifying the difference and live arrays
+                       // (this may be used by custom or dynamically-defined fields)
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['modifyDifferenceArray'])) {
+                       foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['modifyDifferenceArray'] as $className) {
+                               $hookObject = &t3lib_div::getUserObj($className);
+                               $hookObject->modifyDifferenceArray($parameter, $diffReturnArray, $liveReturnArray, $t3lib_diff);
+                       }
+               }
 
                $commentsForRecord = $this->getCommentsForRecord($parameter->uid, $parameter->table);