问题描述
我正在将旧的TYPO3更新到最新的版本6.2.12.当我这样做时,我用适当的名称空间替换了不推荐使用的类.例如. t3lib_div
到\TYPO3\CMS\Core\Utility\GeneralUtility
或t3lib_extmgm
到\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
.
但是我找不到t3lib_svbase
的正确命名空间类.有什么建议吗?
.
我绝对不知道我需要对新的xclassed include做些什么.
//old XCLASS
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/foo_myfancyextension/sv1/class.tx_foomyfancyextension_sv1.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/foo_myfancyextension/sv1/class.tx_foomyfancyextension_sv1.php']);
}
它应该看起来像这样:
//new XCLASS
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\ContentObject\\FluidTemplateContentObject'] = array(
'className' => 'Enet\\FxLibrary\\Xclass\\FluidTemplateContentObject',
);
但是我的扩展名和类本身的路径在哪里?
要使用新的XLASS
功能,您需要遵循约定或创建ext_autoload.php
文件来提供适当的自动加载. /p>
http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Autoloading/Index.html http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Xclasses /Index.html
I'm updating an old TYPO3 to latest verison 6.2.12. As I do so I replace deprecated classes with the proper namespaces. E.g. t3lib_div
to \TYPO3\CMS\Core\Utility\GeneralUtility
or t3lib_extmgm
to \TYPO3\CMS\Core\Utility\ExtensionManagementUtility
.
But I cant find the proper namespaced class for t3lib_svbase
. Any suggestions?
.
And I absolutely have no clue what I need to do with the new xclassed include.
//old XCLASS
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/foo_myfancyextension/sv1/class.tx_foomyfancyextension_sv1.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/foo_myfancyextension/sv1/class.tx_foomyfancyextension_sv1.php']);
}
It should look something like this:
//new XCLASS
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\ContentObject\\FluidTemplateContentObject'] = array(
'className' => 'Enet\\FxLibrary\\Xclass\\FluidTemplateContentObject',
);
But where is the path to my extension and the class itself?
To use the new XLASS
feature, you need to provide a proper autoloading, by either sticking to the convention or by creating an ext_autoload.php
file.
http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Autoloading/Index.htmlhttp://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Xclasses/Index.html
这篇关于TYPO3-将4.5升级到6.2:名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!