3

TYPO3 7.4我有以下内容用于上传启用了新(裁剪工具)TCA configuration的单个图像:ImageManipulation

'single_image_field' => array(
    'exclude' => 1,
    'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:sometable.single_image_field',
    'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
        'single_image_field',
        array(
            'maxitems' => 1,
            'appearance' => array(
                'collapseAll'   => 1,
                'expandSingle'  => 1,
            ),
            'foreign_types' => array(
                \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
                    'showitem' => '--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette'
                ),
            )
        ),
        'jpg,jpeg,png'
    ),
),

现在我喜欢配置我的自定义aspect ratio's。这似乎可以使用TCA configurationof 列类型:(ImageManipulation参见:https ://wiki.typo3.org/TYPO3.CMS/Releases/7.2/Feature#Impact_9 )。

但是如何在上述配置中应用它呢?

4

1 回答 1

4

的默认crop方面ratio's可以sys_file_reference覆盖如下:

$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['ratios'] = array(
    '1.7777777777777777' => '16:9',
    '1.3333333333333333' => '4:3',
    '1' => '1:1',
    'NaN' => 'Free',
);
于 2015-09-30T17:15:39.827 回答