【发布时间】:2015-03-27 11:11:32
【问题描述】:
所以我被分配了一个通常是微不足道的任务,但它必须在一个相当旧的 Typo3-Website (4.5) 上工作。我对 Typo3 非常陌生。
为了进行 AJAX 调用,我发现我需要一个 eID、我自己的类文件、我发现了如何调用 main 函数等等。
现在,我在许多不同的位置有很多配置,我需要访问这些信息。
在class.tx_as_es_pi1.php 中function main($content, $conf) 有这个非常方便的参数$conf。似乎这是由一些 Typo3 魔术提供的。试图以某种方式模仿这种行为,我尝试了this 答案,它使用这些行为我提供了一些配置:
$conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_ases_pi1.'];
var_dump($conf);
我得到这个结果:
'includeLibs' => string 'typo3conf/ext/as_es/pi1/class.tx_as_es_pi1.php' (length=46)
'userFunc' => string 'tx_ases_pi1->main' (length=17)
但 Typoscript 对象浏览器显示更多内容(包括我需要的内容):
[tx_ases_pi1] = USER_INT # TypoScript added by extension "as_es" # Setting as_es plugin TypoScript
[includeLibs] = typo3conf/ext/as_es/pi1/class.tx_as_es_pi1.php
[userFunc] = tx_ases_pi1->main
[config_template] = EXT:as_es/templates/results_elkwue.htm
[config_template_extended] = EXT:as_es/templates/extended_elkwue.htm
[config_searchaccesskey] = someAccessKey
[config_searchproxy] = someProxyUrl
[config_searchfilterurl] = soeSearchFilterUrl
[config_searchshowstat] = 1
[config_utf8decode] = 1
[config_maxtitlelength] = 50
[config_removefromtitle] = SomeString
[config_piwiktracking_host] = somePiwikHost
[config_piwiktracking_port] = 80
[config_piwiktracking_id] = SomeID
[config_fedebug_messages_search] = {$plugin.tx_ases_pi1.configuration.fedebug_messages_search}
所以,很明显,这里有一些我不太了解的东西。谁能指出我正确的方向?
[EDIT] 相关问题的答案只提供了部分配置数据,如上图。我正在寻找有关如何检索其余数据的提示。
【问题讨论】:
-
不是重复的。如果有的话,那就是要求澄清。正如我的问题所述,我尝试了该问题的解决方案,但对我没有帮助。
-
你是对的,这不是重复的 - 对不起标志。