From ae58ff10e1cad3cb269cb92bccfd46d05cd989c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Mon, 24 Sep 2018 15:33:55 +0200 Subject: [PATCH] Add crop variants to textmedia element --- .../TCA/Overrides/tt_content.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/web/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content.php b/web/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content.php index a0529983..42431cb5 100644 --- a/web/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content.php +++ b/web/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content.php @@ -169,6 +169,39 @@ call_user_func(function () { 'after:header_layout' ); + $GLOBALS['TCA']['tt_content']['types']['textmedia']['columnsOverrides']['assets']['config']['overrideChildTca'] = [ + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Preview', + 'allowedAspectRatios' => [ + 'preview' => [ + 'title' => 'Standard', + 'value' => 1.8, + ], + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + 'zoom' => [ + 'title' => 'Zoom', + 'allowedAspectRatios' => [ + 'free' => [ + 'title' => 'frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], + ]; + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'EP.EpTheme', 'SimpleForm',