TYPO3:使用函数覆盖$ GLOBALS ['TCA'] [英] TYPO3: Override $GLOBALS['TCA'] with a function

查看:57
本文介绍了TYPO3:使用函数覆盖$ GLOBALS ['TCA']的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的扩展程序中,我使用tca/override文件夹中的tablename.php文件覆盖由另一个扩展程序定义的某些内容.我知道我可以做到:

In my extension I use an tablename.php file inside the tca/override folder to override some stuff defined by another extension. I know I can do this:

$GLOBALS['TCA']['tablename']['columns']['anoption']['config']['minitems'] = 1;

但是当原始文件显示:

... 'anoption''config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
        'anoption',
        ['maxitems' => 7,]

什么是覆盖语法?我正在尝试类似的东西:

What will be the override syntax? I was trying something like:

$GLOBALS['TCA']['tablename']['columns']['anoption']['config']['anoption']['maxitems'] = 3;

但这不起作用,我不知道在配置后必须插入什么,因为在原始文件中有getFileTCAConfig函数.

But that doesn't work and I don't know what I have to insert after config since in the original file there is that getFileTCAConfig function.

我还想知道如何调试"$ GLOBALS ['TCA'] ['tablename'] ['columns'] ['anoption']"以某种方式查看所有子选项,因为我没有在mysql数据库,我无法从phpMyAdmin中读取任何配置.

Also I was wondering how I could debug "$GLOBALS['TCA']['tablename']['columns']['anoption']" to somehow see all the suboptions, since I did not find anything inside the mysql database, I couldn't read any config from the phpMyAdmin.

感谢所有帮助!

推荐答案

您可以通过 System 部分中的 Configuration 模块在TYPO3后端中调试最终的TCA.打开该模块后,在最上方的功能选择框中选择 $ GLOBALS ['TCA'](表配置数组):

You can debug the final TCA in the TYPO3 backend through the Configuration module in the System section. Once you open that module you select $GLOBALS['TCA'] (Table configuration array) in the topmost function select box:

这篇关于TYPO3:使用函数覆盖$ GLOBALS ['TCA']的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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