<?php

//https://stackoverflow.com/questions/60154157/define-typo3-content-element-layouts-for-a-specific-list-type

namespace AmadeusAgentur\SeragWiessner\Tca;

class TtContentLayoutOptions
{
    public function addOptions(array &$params): void
    {
        $ttContentEntry = $params['row'];
        $cType = $ttContentEntry['CType'];
        if (is_array($cType)) {
            $cType = $cType[0];
        }
        
        if ($cType == 'list' && $ttContentEntry['list_type'] == 'news_pi1') {
            // Add layout options for list_type "XYZ" here:
            $params['items'][] = [
                'Standalone',
                '100'
            ];
        }
        
    }
}
