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

defined('TYPO3') or die();

ExtensionUtility::registerPlugin(
    'IgReservations',
    'CalendarList',
    'Reservations: List of Calendars'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'PublicCalendar',
    'Reservations: Public Calendar'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'Ajax',
    'Reservations: Ajax'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'EventTodo',
    'Reservations: Events Approval List'
);


ExtensionUtility::registerPlugin(
    'IgReservations',
    'Overview',
    'Reservations: Overview'
);


ExtensionUtility::registerPlugin(
    'IgReservations',
    'Alarm',
    'Reservations: Alarm'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'EventList',
    'Reservations: Event List'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'FeUserManagement',
    'Reservations: User Management'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'LocationManagement',
    'Reservations: Location Management'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'LocationList',
    'Reservations: Location List'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'MyReservations',
    'Reservations: My Reservations'
);

ExtensionUtility::registerPlugin(
    'IgReservations',
    'Statistics',
    'Reservations: Statistics'
);


$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['igreservations_publiccalendar'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue('igreservations_publiccalendar', 'FILE:EXT:ig_reservations/Configuration/FlexForms/flexform_publiccalendar.xml');

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['igreservations_eventlist'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue('igreservations_eventlist', 'FILE:EXT:ig_reservations/Configuration/FlexForms/flexform_eventlist.xml');

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['igreservations_locationlist'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue('igreservations_locationlist', 'FILE:EXT:ig_reservations/Configuration/FlexForms/flexform_locationlist.xml');

//$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['igreservations_statistics'] = 'pi_flexform';
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('igreservations_statistics', 'FILE:EXT:ig_reservations/Configuration/FlexForms/flexform_statistics.xml');
