简体   繁体   English

TYPO 9 和 10 中的 TCA 添加向导

[英]TCA ADD wizard in TYPO 9 and 10

I want to update an extension from TYPO3 v7 to v9.我想将一个扩展从 TYPO3 v7 更新到 v9。 In v7 is it possible to add an ADD-Wizard to a select field in the TCA:在 v7 中,是否可以将 ADD-Wizard 添加到 TCA 中的选择字段:

'wizards' => array(
    '_PADDING'  => 2,
    '_VERTICAL' => 1,
    'add' => Array(
        'type' => 'script',
        'title' => 'Create new record',
        'icon' => 'add.gif',
        'params' => Array(
            'table'=>'myTable',
            'pid' => '###CURRENT_PID###',
            'setValue' => 'prepend'
        ),
        'module' => array(
            'name' => 'wizard_add',
        )
    ),
),

in TYPO3 9 this does not work anymore.在 TYPO3 9 中,这不再起作用。 I the manual i cannot find anything to the TCA wizards anymore since version 8.我在手册中找不到任何关于 TCA 向导的内容,因为版本 8。

Are they gone, or is there an other way to achive the same?它们消失了,还是有其他方法可以实现相同的目标?

Thanks!谢谢!

You need to migrate to fieldControl used since TYPO3v8 and newer.您需要迁移到fieldControl使用,因为TYPO3v8和更新。

'fieldControl' => [
    'addRecord' => [
        'disabled' => false,
        'options' => [
            'table' => 'myTable',
            'setValue' => 'prepend',
        ],
    ],
],

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM