Classes/TcaDataGenerator/FieldGenerator/TypeSelect.php
public function generate(array $data): string
    {
        $result = [];
        if (isset($data['fieldConfig']['config']['items']) && count($data['fieldConfig']['config']['items']) > 1) {
            $numberOfItemsToSelect = 1;
            if (isset($data['fieldConfig']['config']['minitems'])) {
                $numberOfItemsToSelect = $data['fieldConfig']['config']['minitems'];
            }
            $isFirst = true;
            foreach ($data['fieldConfig']['config']['items'] as $item) {
                if ($isFirst) {
                    // Ignore first item
                    $isFirst = false;
                    continue;
                }
                // Ignore divider
                if (isset($item[1]) && $item[1] !== '--div--') {
                    if (count($result) <= $numberOfItemsToSelect) {
                        $result[] = $item[1];
                    }
                    if (count($result) === $numberOfItemsToSelect) {
                        break;
                    }
                }
            }
        }
        return implode(',', $result);
    }
public function generate(array $data): string
    {
        $result = [];
        if (isset($data['fieldConfig']['config']['items']) && count($data['fieldConfig']['config']['items']) > 1) {
            $numberOfItemsToSelect = 1;
            if (isset($data['fieldConfig']['config']['minitems'])) {
                $numberOfItemsToSelect = $data['fieldConfig']['config']['minitems'];
            }
            $isFirst = true;
            foreach ($data['fieldConfig']['config']['items'] as $item) {
                if ($isFirst) {
                    // Ignore first item
                    $isFirst = false;
                    continue;
                }
                // Ignore divider
                if (isset($item[1]) && $item[1] !== '--div--') {
                    if (count($result) <= $numberOfItemsToSelect) {
                        $result[] = $item[1];
                    }
                    if (count($result) === $numberOfItemsToSelect) {
                        break;
                    }
                }
            }
        }
        return implode(',', $result);
    }
public function generate ( array $ data ) : string { $ result = [ ] ; if ( isset ( $ data [ 'fieldConfig' ] [ 'config' ] [ 'items' ] ) && count ( $ data [ 'fieldConfig' ] [ 'config' ] [ 'items' ] ) > 1 ) { $ numberOfItemsToSelect = 1 ; if ( isset ( $ data [ 'fieldConfig' ] [ 'config' ] [ 'minitems' ] ) ) { $ numberOfItemsToSelect = $ data [ 'fieldConfig' ] [ 'config' ] [ 'minitems' ] ; } $ isFirst = true ; foreach ( $ data [ 'fieldConfig' ] [ 'config' ] [ 'items' ] as $ item ) { if ( $ isFirst ) { // Ignore first item $ isFirst = false ; continue ; } // Ignore divider if ( isset ( $ item [ 1 ] ) && $ item [ 1 ] !== '--div--' ) { if ( count ( $ result ) <= $ numberOfItemsToSelect ) { $ result [ ] = $ item [ 1 ] ; } if ( count ( $ result ) === $ numberOfItemsToSelect ) { break ; } } } } return implode ( ',' , $ result ) ; }
Selects the second item from a static item list if there are
at least two items.

@param array $data
@return string
Selects the second item from a static item list if there are at least two items .