<?php
defined('TYPO3_MODE') or die();

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

call_user_func(function () {
    $additionalColumns = [
        'roof' => [
            'exclude' => true,
            'label' => 'LLL:EXT:pagemanager/Resources/Private/Language/locallang_db.xlf:pages.roof',
            'config' => [
                'type' => 'input',
                'size' => 30,
                'eval' => 'trim',
            ],
        ],
        'red_status' => [
            'exclude' => true,
            'label' => 'LLL:EXT:pagemanager/Resources/Private/Language/locallang_db.xlf:pages.red_status',
            'config' => [
                'type' => 'input',
                'size' => 30,
                'eval' => 'trim',
            ],
        ],
    ];

    ExtensionManagementUtility::addTCAcolumns('pages', $additionalColumns);
    ExtensionManagementUtility::addToAllTCAtypes('pages', 'roof');
    ExtensionManagementUtility::addToAllTCAtypes('pages', 'red_status');
});