如何修改FAL参考的TCA ImageManipulation配置?

时间:2015-09-20 12:34:12

标签: typo3 typo3-7.x

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 configuration列类型ImageManipulation似乎也可以这样做(参见:https://wiki.typo3.org/TYPO3.CMS/Releases/7.2/Feature#Impact_9)。

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

1 个答案:

答案 0 :(得分:4)

In@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final EditText et = (EditText) this.findViewById(R.id.someDataInB); final Button btn = (Button) this.findViewById(R.id.button); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = MainActivity.this.getPackageManager().getLaunchIntentForPackage("com.comp.ActivityA"); MainActivity.this.startActivity(i); } }); } 的默认 <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 方面 <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 可以覆盖如下:

crop