php - TYPO3:从另一个扩展覆盖 TCA 后端类公共变量
问题描述
我正在使用 Typo3 的 tx_news 扩展。因此,我想禁用一些在我的页面上未使用的设置,例如类别:
我已经在 PageTS 中为这样的记录禁用了它们:
TCEFORM {
tx_news_domain_model_news {
categories.disabled = 1
}
}
从管理过滤器和列中删除它们:
tx_news {
module {
columns = istopnews,datetime,author
filters {
categories = 0
categoryConjunction = 0
includeSubCategories = 0
}
}
}
现在,我还想在将插件添加到页面时在插件设置中禁用它们。在 BackendUtility.php 中,我发现以下几行将为我执行此操作(请注意,我添加了类别 categoryConjunction,..):
public $removedFieldsInListView = [
'sDEF' => 'dateField,singleNews,previewHiddenRecords,selectedList,categories,categoryConjunction,includeSubCategories',
'additional' => '',
'template' => ''
];
当然,像这样我已经禁用了类别,但是通过直接编辑扩展而不是从我自己的扩展中覆盖它,这意味着当我更新 tx_news 时,我将丢失该配置。
我必须添加什么 $GLOBALS[TCA].. 才能获得相同的结果?我在后端调试中找不到任何东西...
我正在搜索类似的东西(或一些 TypoScript 的东西,如果可能的话):
$GLOBALS['TCA']['tx_news_domain_model_news']['plugin']['backendUtility'][removeFieldsInListView]= 'bla, blabla, bla';
我感谢所有的帮助!
解决方案
你有没有试过这样的 TsConfig
TCEFORM {
tt_content {
pi_flexform {
news_pi1 {
sDEF {
# Important is the escaping of the dot which is part of the fieldname
settings\.orderBy.disabled = 1
}
}
}
}
}
推荐阅读
- node.js - 为什么“NLPCloud”模块可以在 IntelliJ IDEA Ultimate 上看到“可用包”?
- ios - 如何在 Xcode 12 中设置打开终端/运行 shell 命令的快捷方式?
- ecmascript-6 - 有没有办法拦截和修改内置类的静态方法?
- javascript - 插入两个 SVG 路径
- python - 如何从python中的字符串中提取国家
- android - 我的 Firebase 无法上传到实时数据库?安卓科特林
- python - 如何从多边形几何中获取坐标数组
- sql - 从(本身左连接其他表)更新表
- visual-studio-code - VSCode - 如何删除文件夹内文件夹的正斜杠?
- kotlin - Klaxon 解析 null