Neos\Flow\Configuration\ConfigurationManager::includeSubRoutesFromSettings PHP Method

includeSubRoutesFromSettings() protected method

Merges routes from Neos.Flow.mvc.routes settings into $routeDefinitions NOTE: Routes from settings will always be appended to existing route definitions from the main Routes configuration!
protected includeSubRoutesFromSettings ( array &$routeDefinitions ) : void
$routeDefinitions array
return void
    protected function includeSubRoutesFromSettings(&$routeDefinitions)
    {
        $routeSettings = $this->getConfiguration(self::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow.mvc.routes');
        if ($routeSettings === null) {
            return;
        }
        $sortedRouteSettings = (new PositionalArraySorter($routeSettings))->toArray();
        foreach ($sortedRouteSettings as $packageKey => $routeFromSettings) {
            if ($routeFromSettings === false) {
                continue;
            }
            $subRoutesName = $packageKey . 'SubRoutes';
            $subRoutesConfiguration = ['package' => $packageKey];
            if (isset($routeFromSettings['variables'])) {
                $subRoutesConfiguration['variables'] = $routeFromSettings['variables'];
            }
            if (isset($routeFromSettings['suffix'])) {
                $subRoutesConfiguration['suffix'] = $routeFromSettings['suffix'];
            }
            $routeDefinitions[] = ['name' => $packageKey, 'uriPattern' => '<' . $subRoutesName . '>', 'subRoutes' => [$subRoutesName => $subRoutesConfiguration]];
        }
    }