<?php

/**
 * Register static Page TSconfig file
 */

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
    'bagger_site_package',
    'Configuration/TSconfig/Page/basic.tsconfig',
    'Bagger site package'
);

/**
 * Add crop editor
 */

$cropConfiguration = \CYBOB\BaggerSitePackage\Utility\TcaUtility::getDefaultCropConfiguration();;

$GLOBALS['TCA']['pages']['columns']['media']['config']['overrideChildTca']['columns']['crop']['config'] = [
    'cropVariants' => array_merge_recursive(
        [
            'default' => [
                'disabled' => true
            ]
        ],
        $cropConfiguration
    )
];
