Feature request #6237: Added hook to Web>Page "columns" view, allowing plugins to...
authorErnesto Baschny <ernst@cron-it.de>
Thu, 30 Aug 2007 17:36:51 +0000 (17:36 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Thu, 30 Aug 2007 17:36:51 +0000 (17:36 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2474 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/layout/class.tx_cms_layout.php

index 8f70ea3..3fc0f26 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-30  Ernesto Baschny  <ernst@cron-it.de>
+
+       * (feature) Feature request #6237: Added hook to Web>Page "columns" view, allowing plugins to display "additional info" instead of "CODE:"
+
 2007-08-30  Wolfgang Klinger  <wk@plan2.net>
 
        * (trivial) Extended the Workspace module access check with the User module access check
index 8c9b80a..0f66c9a 100755 (executable)
@@ -1767,8 +1767,24 @@ class tx_cms_layout extends recordList {
                                $out.=  $this->infoGif($infoArr).
                                                $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','list_type'),1).' '.
                                                $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content','list_type',$row['list_type']),1).'<br />';
-
-                               $out.=  $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','select_key'),1).' '.$row['select_key'].'<br />';
+                               $hookArr = array();
+                               $hookOut = '';
+                               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']]))     {
+                                       $hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']];
+                               } elseif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT']))      {
+                                       $hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'];
+                               }
+                               if (count($hookArr) > 0)        {
+                                       $_params = array('pObj' => &$this, 'row' => $row, 'infoArr' => $infoArr);
+                                       foreach ($hookArr as $_funcRef) {
+                                               $hookOut .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
+                                       }
+                               }
+                               if (strcmp($hookOut, ''))       {
+                                       $out .= $hookOut;
+                               } else  {
+                                       $out.=  $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','select_key'),1).' '.$row['select_key'].'<br />';
+                               }
 
                                $infoArr=Array();
                                $this->getProcessedValue('tt_content','recursive',$row,$infoArr);