Classes/TcaDataGenerator/Generator.php
protected function getListOfStyleguideMainTables(): array
    {
        $prefixes = [
            'tx_styleguide_',
            'tx_styleguide_elements_',
            'tx_styleguide_inline_',
        ];
        $result = [];
        foreach ($GLOBALS['TCA'] as $tablename => $_) {
            if ($tablename === 'tx_styleguide_staticdata') {
                continue;
            }
            foreach ($prefixes as $prefix) {
                if (!StringUtility::beginsWith($tablename, $prefix)) {
                    continue;
                }

                // See if string after $prefix is only one _ separated segment
                $suffix = substr($tablename, strlen($prefix));
                $suffixArray = explode('_', $suffix);
                if (count($suffixArray) !==  1) {
                    continue;
                }

                // Found a main table
                $result[] = $tablename;

                // No need to scan other prefixes
                break;
            }
        }
        // Manual resorting - the "staticdata" table is used by other tables later.
        // We resort this on top so it is handled first and other tables can rely on
        // created data already. This is a bit hacky but a quick workaround.
        array_unshift($result, 'tx_styleguide_staticdata');
        return $result;
    }
protected function getListOfStyleguideMainTables(): array
    {
        $prefixes = [
            'tx_styleguide_',
            'tx_styleguide_elements_',
            'tx_styleguide_inline_',
        ];
        $result = [];
        foreach ($GLOBALS['TCA'] as $tablename => $_) {
            if ($tablename === 'tx_styleguide_staticdata') {
                continue;
            }
            foreach ($prefixes as $prefix) {
                if (!StringUtility::beginsWith($tablename, $prefix)) {
                    continue;
                }

                // See if string after $prefix is only one _ separated segment
                $suffix = substr($tablename, strlen($prefix));
                $suffixArray = explode('_', $suffix);
                if (count($suffixArray) !==  1) {
                    continue;
                }

                // Found a main table
                $result[] = $tablename;

                // No need to scan other prefixes
                break;
            }
        }
        // Manual resorting - the "staticdata" table is used by other tables later.
        // We resort this on top so it is handled first and other tables can rely on
        // created data already. This is a bit hacky but a quick workaround.
        array_unshift($result, 'tx_styleguide_staticdata');
        return $result;
    }
protected function getListOfStyleguideMainTables ( ) : array { $ prefixes = [ 'tx_styleguide_' , 'tx_styleguide_elements_' , 'tx_styleguide_inline_' , ] ; $ result = [ ] ; foreach ( $ GLOBALS [ 'TCA' ] as $ tablename => $ _ ) { if ( $ tablename === 'tx_styleguide_staticdata' ) { continue ; } foreach ( $ prefixes as $ prefix ) { if ( ! StringUtility :: beginsWith ( $ tablename , $ prefix ) ) { continue ; } // See if string after $prefix is only one _ separated segment $ suffix = substr ( $ tablename , strlen ( $ prefix ) ) ; $ suffixArray = explode ( '_' , $ suffix ) ; if ( count ( $ suffixArray ) !== 1 ) { continue ; } // Found a main table $ result [ ] = $ tablename ; // No need to scan other prefixes break ; } } // Manual resorting - the "staticdata" table is used by other tables later. // We resort this on top so it is handled first and other tables can rely on // created data already. This is a bit hacky but a quick workaround. array_unshift ( $ result , 'tx_styleguide_staticdata' ) ; return $ result ; }
List of styleguide "main" pages.

A styleguide table is either a "main" entry table or a "child" table that
belongs to a main table. Each "main" table is located at an own page with all its children.

The difference is a naming thing, styleguide tables have a
"prefix"_"identifier"_"childidentifier" structure.

Example:
prefix = tx_styleguide_inline, identifier = 1n
-> "tx_styleguide_inline_1n" is a "main" table
-> "tx_styleguide_inline_1n1n" is a "child" table

In general the list of prefixes is hard coded. If a specific table name is a concatenation
of a prefix plus a single word, then the table is considered a "main" table, if there are more
than one words after prefix, it is a "child" table.

This method return the list of "main" tables.

@return array
List of styleguide main pages .