src/ViewCombination/InputScreenInformationBuilder.php
private function fetchGroupSort($inputScreenId, IMetaModel $metaModel): array
    {
        $builder = $this->connection->createQueryBuilder();

        return array_map(function ($information) use ($inputScreenId, $metaModel) {
            $information['isdefault']      = (bool) $information['isdefault'];
            $information['ismanualsort']   = (bool) $information['ismanualsort'];
            $information['rendergrouplen'] = (int) $information['rendergrouplen'];
            if ($information['ismanualsort']) {
                $information['rendergrouptype'] = 'none';
            }

            if (!empty($information['rendersortattr'])) {
                if (!($attribute = $metaModel->getAttributeById($information['rendersortattr']))) {
                    // @codingStandardsIgnoreStart
                    @trigger_error(
                        sprintf(
                            'Unknown attribute "%1$s" in group sorting "%2$s.%3$s"',
                            $information['rendersortattr'],
                            $inputScreenId,
                            $information['id']
                        ),
                        E_USER_WARNING
                    );
                    // @codingStandardsIgnoreEnd
                    return $information;
                }
                $information['col_name'] = $attribute->getColName();
            }

            return $information;
        }, $builder
            ->select('*')
            ->from('tl_metamodel_dca_sortgroup')
            ->where('pid=:screenId')
            ->setParameter('screenId', $inputScreenId)
            ->orderBy('sorting')
            ->execute()
            ->fetchAll(\PDO::FETCH_ASSOC));
    }
private function fetchGroupSort($inputScreenId, IMetaModel $metaModel): array
    {
        $builder = $this->connection->createQueryBuilder();

        return array_map(function ($information) use ($inputScreenId, $metaModel) {
            $information['isdefault']      = (bool) $information['isdefault'];
            $information['ismanualsort']   = (bool) $information['ismanualsort'];
            $information['rendergrouplen'] = (int) $information['rendergrouplen'];
            if ($information['ismanualsort']) {
                $information['rendergrouptype'] = 'none';
            }

            if (!empty($information['rendersortattr'])) {
                if (!($attribute = $metaModel->getAttributeById($information['rendersortattr']))) {
                    // @codingStandardsIgnoreStart
                    @trigger_error(
                        sprintf(
                            'Unknown attribute "%1$s" in group sorting "%2$s.%3$s"',
                            $information['rendersortattr'],
                            $inputScreenId,
                            $information['id']
                        ),
                        E_USER_WARNING
                    );
                    // @codingStandardsIgnoreEnd
                    return $information;
                }
                $information['col_name'] = $attribute->getColName();
            }

            return $information;
        }, $builder
            ->select('*')
            ->from('tl_metamodel_dca_sortgroup')
            ->where('pid=:screenId')
            ->setParameter('screenId', $inputScreenId)
            ->orderBy('sorting')
            ->execute()
            ->fetchAll(\PDO::FETCH_ASSOC));
    }
Fetch groupings for an input screen.

@param string     $inputScreenId The input screen to obtain properties for.
@param IMetaModel $metaModel     The MetaModel to fetch properties for.

@return array