2010-04-10 Steffen Kamper <info@sk-typo3.de>
+ * Added feature #13953: Hookrequest - t3lib_page::getRecordOverlay (thanks to Tolleiv Nietsch)
* Added feature #14041: impexp: Add Hooks
* Added feature #13949: Hookrequest - alt_doc::makeEditForm() to enable further access-restrictions (thanks to Tolleiv Nietsch)
* Added feature #13948: Hookrequest - tslib_fe pre/post process for settingLanguage() (thanks to Tolleiv Nietsch)
function getRecordOverlay($table,$row,$sys_language_content,$OLmode='') {
global $TCA;
+ if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'])) {
+ foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'] as $classRef) {
+ $hookObject = t3lib_div::getUserObj($classRef);
+
+ if (!($hookObject instanceof t3lib_pageSelect_getRecordOverlayHook)) {
+ throw new UnexpectedValueException('$hookObject must implement interface t3lib_pageSelect_getRecordOverlayHook', 1269881658);
+ }
+ $hookObject->getRecordOverlay_preProcess($table,$row,$sys_language_content,$OLmode, $this);
+ }
+ }
+
if ($row['uid']>0 && $row['pid']>0) {
if ($TCA[$table] && $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField']) {
if (!$TCA[$table]['ctrl']['transOrigPointerTable']) { // Will not be able to work with other tables (Just didn't implement it yet; Requires a scan over all tables [ctrl] part for first FIND the table that carries localization information for this table (which could even be more than a single table) and then use that. Could be implemented, but obviously takes a little more....)
}
}
}
+ if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'])) {
+ foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'] as $classRef) {
+ $hookObject = t3lib_div::getUserObj($classRef);
+ if (!($hookObject instanceof t3lib_pageSelect_getRecordOverlayHook)) {
+ throw new UnexpectedValueException('$hookObject must implement interface t3lib_pageSelect_getRecordOverlayHook', 1269881659);
+ }
+ $hookObject->getRecordOverlay_postProcess($table,$row,$sys_language_content,$OLmode, $this);
+ }
+ }
return $row;
}
't3lib_browselinkshook' => PATH_t3lib . 'interfaces/interface.t3lib_browselinkshook.php',
't3lib_localrecordlistgettablehook' => PATH_t3lib . 'interfaces/interface.t3lib_localrecordlistgettablehook.php',
't3lib_pageselect_getpagehook' => PATH_t3lib . 'interfaces/interface.t3lib_pageselect_getpagehook.php',
+ 't3lib_pageselect_getrecordoverlayhook' => PATH_t3lib . 'interfaces/interface.t3lib_pageselect_getrecordoverlayhook.php',
't3lib_pageselect_getpageoverlayhook' => PATH_t3lib . 'interfaces/interface.t3lib_pageselect_getpageoverlayhook.php',
't3lib_singleton' => PATH_t3lib . 'interfaces/interface.t3lib_singleton.php',
't3lib_tceformsinlinehook' => PATH_t3lib . 'interfaces/interface.t3lib_tceformsinlinehook.php',
--- /dev/null
+<?php\r
+/***************************************************************\r
+* Copyright notice\r
+*\r
+* (c) 2010 Tolleiv Nietsch <nietsch@aoemedia.de>\r
+* All rights reserved\r
+*\r
+* This script is part of the TYPO3 project. The TYPO3 project is\r
+* free software; you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation; either version 2 of the License, or\r
+* (at your option) any later version.\r
+*\r
+* The GNU General Public License can be found at\r
+* http://www.gnu.org/copyleft/gpl.html.\r
+* A copy is found in the textfile GPL.txt and important notices to the license\r
+* from the author is found in LICENSE.txt distributed with these scripts.\r
+*\r
+*\r
+* This script is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+* GNU General Public License for more details.\r
+*\r
+* This copyright notice MUST APPEAR in all copies of the script!\r
+***************************************************************/\r
+\r
+\r
+/**\r
+ * interface for classes which hook into t3lib_pageSelect\r
+ *\r
+ * @author Tolleiv Nietsch <nietsch@aoemedia.de>\r
+ * @package TYPO3\r
+ * @subpackage t3lib\r
+ */\r
+\r
+interface t3lib_pageSelect_getRecordOverlayHook {\r
+\r
+ /**\r
+ * Enables to preprocess a record overlay\r
+ *\r
+ * @param string $table\r
+ * @param array $row\r
+ * @param integer $sys_language_content\r
+ * @param string $OLmode\r
+ * @param t3lib_pageSelect $parent\r
+ */\r
+ public function getRecordOverlay_preProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent);\r
+\r
+ /**\r
+ * Enables to postprocess a record overlay\r
+ *\r
+ * @param string $table\r
+ * @param array $row\r
+ * @param integer $sys_language_content\r
+ * @param string $OLmode\r
+ * @param t3lib_pageSelect $parent\r
+ */\r
+ public function getRecordOverlay_postProcess($table, &$row, &$sys_language_content, $OLmode, t3lib_pageSelect $parent);\r
+\r
+}\r
+\r
+?>\r