protected function parsePropertySortingAndGrouping($propName, $propInfo, $definitions, $parsedProperties)
    {
        if (empty($propInfo['sorting']) || \in_array($propName, $parsedProperties)) {
            return;
        }

        $definition  = $definitions->add()->setName($propName);
        $information = $definition->add();
        $information->setProperty($propName);
        if (isset($propInfo['length'])) {
            $information->setGroupingLength($propInfo['length']);
        }

        // Special case for field named "sorting" in Contao.
        if ('sorting' === $propName) {
            $information->setManualSorting();
        }

        // If no default sorting and grouping definition is defined, assume the first one is default.
        if (!$definitions->hasDefault()) {
            $definitions->markDefault($definition);
        }

        $flag = empty($propInfo['flag']) ? $this->getFromDca('list/sorting/flag') : $propInfo['flag'];
        $this->evalFlag($information, $flag);
    }