gpt4 book ai didi

typo3 - 在 extbase/fluid 中使 imagefield 成为必需的

转载 作者:行者123 更新时间:2023-12-05 08:58:57 25 4
gpt4 key购买 nike

在我的 TCA 配置中,我有以下代码:

'image' => array(
'exclude' => 0,
'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_modelname.image',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'uploadfolder' => 'uploads/tx_myext',
'show_thumbs' => 1,
'size' => 5,
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'disallowed' => '',
'eval' => 'required'
),
),

我添加了 'eval' => 'required'(最后一行)但图像仍然不是必需的。

在文本 'eval' => 'required' 等其他元素上有效:

'homepage' => array(
'exclude' => 0,
'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_modelname.homepage',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),

最后一个问题:如何制作需要的图片?

最佳答案

minitems 设置为 1。

'image' => array(
'exclude' => 0,
'label' => 'LLL:EXT:next_itrocksfirmen/Resources/Private/Language/locallang_db.xml:tx_myext_domain_model_modelname.image',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'uploadfolder' => 'uploads/tx_myext',
'show_thumbs' => 1,
'size' => 5,
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'disallowed' => '',
'minitems' => 1
),
),

http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Group/Index.html

关于typo3 - 在 extbase/fluid 中使 imagefield 成为必需的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19045763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com