TYPO3-将4.5升级到6.2:名称空间 [英] TYPO3-Upgrade 4.5 to 6.2: namespaces

查看:89
本文介绍了TYPO3-将4.5升级到6.2:名称空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将旧的TYPO3更新到最新的版本6.2.12.当我这样做时,我用适当的名称空间替换了不推荐使用的类.例如. t3lib_div\TYPO3\CMS\Core\Utility\GeneralUtilityt3lib_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.html http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Xclasses/Index.html

这篇关于TYPO3-将4.5升级到6.2:名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆