<?php
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

ExtensionUtility::registerPlugin(
    'IgChart',
    'Igchart',
    'Chart'
);

$GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'][] = [ 'Chart', 'chart' ];

$GLOBALS['TCA']['tt_content']['types']['chart']['showitem'] = $GLOBALS['TCA']['tt_content']['types']['header']['showitem'];

ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:ig_chart/Configuration/FlexForms/ChartFlexform.xml', 'chart');

ExtensionManagementUtility::addToAllTCAtypes("tt_content", "--div--;Chart,pi_flexform;;;;1-1-1,", "chart", "after:subheader");
