[TYPO3-dev] interest on enhanced API for page module?

Tapio Markula tapio.markula at xetpoint.fi
Fri Aug 24 11:50:03 CEST 2007


Tapio Markula
 >
 > It would be nice to have hook handling CType also
 >
 > // Make content:
 >         $infoArr=Array();
 >         switch($row['CType'])    {
 > ...
 >
 >             default:
 >                 $hookName='previewCType_'.$row['CType'];
 >                 if (is_array 
($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cms']['CType'][$hookName])) { 
                                  $hookObj= 
&t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cms']['externalTables'][$hookName]);
 >                     if (method_exists($hookObj, $hookName))
 >                         // put into hook just call of 
t3lib_BEfunc::getFuncMenu if that is needed
 >                          $out .= $hookObj->$hookName($this);
 >                     $hookObj=NULL;
 >                     }
 >                 elseif ($row['bodytext']) {

B. Kraft has for this already definition:
This base on kb_nescefe

             default:
                 if ($cRef = 
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['web_layout_ttcontent_previewFuncObj'][$row['CType']]) 
{
                     ;
                     $hookObj= &t3lib_div::getUserObj($cRef);
                     if (method_exists($hookObj, 'renderPreview'))
                          $out .= $hookObj->renderPreview('tt_content', 
$row, $isRTE, $lP, $this);
                     $hookObj=NULL;$cRef=NULL;




More information about the TYPO3-dev mailing list