[TYPO3-dev] interest on enhanced API for page module?
Tapio Markula
tapio.markula at xetpoint.fi
Fri Aug 24 10:29:31 CEST 2007
Franz Holzinger kirjoitti:
> Hello
>
>>> http://bugs.typo3.org/view.php?id=1822
>> In addition of that *unset* some table
>>
>> function getTable($table,$id) {
>>
>> $typesDisabledTables =
>> t3lib_div::trimExplode(',',strtolower($this->modSharedTSconfig['properties']['disabledTables']),1);
>>
>> if(is_array($typesDisabledTabs))
>> $disabledTables = array_flip($typesDisabledTables);
>> $typesDisabledTables=NULL;
>> // check if rendering of the table is disabled - if disabled
>> set $table as NULL
>> // Load full table definition (if table can be shown):
>> if(!isset($disabledTables[$table])
>> t3lib_div::loadTCA($table);
>> else $table=NULL;
>
> Yes this sounds reasonable and very helpful if someone does not want
> some tables to be listed in the page module.
>
> Is there any chance to get this patch and maybe additional ones into the
> TYPO3 Core? Is it necessary that I collect money for it to pay the Core
> developers? Or is it not understandable enough what this patch is
> usefull for?
> Or do you prefer that I write an new extension for it which bases on
> XCLASS instead of using a Core API with hooks?
I can add necessary features to tm_contentaccees
hooks are needed to - see my other post concerning this topic.
I found also that db_layout.php needs hook for handling possible
function menu.
function renderListContent() {
...
// Traverse the list of table names which has records on this page
(that array is populated by the $dblist object during the function
getTableMenu()):
reset($dblist->activeTables);
while(list($table)=each($dblist->activeTables)) {
...
// Creating special conditions for each table:
switch($table) {
...
// hook for defining func menu, if needed
elseif (is_array
($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cms']['externalTables'][$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
$h_func =
$hookObj->$hookName($this->id,'SET['.$table.']',$this->MOD_SETTINGS[$table],$this->MOD_MENU[$table],'db_layout.php','');
$hookObj=NULL;
}
else
$h_func = '';
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']) {
More information about the TYPO3-dev
mailing list