protected function createGroup(
        ServiceLocatorInterface $serviceLocator,
        RouteInterface $route,
        array $children,
        bool $abstract = null
    ): RouteInterface {
        /** @var GroupRoute $group */
        $group = $serviceLocator->getService(GroupRoute::class, [
            'route' => $route,
            'abstract' => $abstract,
        ]);

        foreach ($children as $name => $child) {
            $group->addRoute(
                $this->createRoute($serviceLocator, $child),
                $name
            );
        }

        return $group;
    }
protected function createGroup(
        ServiceLocatorInterface $serviceLocator,
        RouteInterface $route,
        array $children,
        bool $abstract = null
    ): RouteInterface {
        /** @var GroupRoute $group */
        $group = $serviceLocator->getService(GroupRoute::class, [
            'route' => $route,
            'abstract' => $abstract,
        ]);

        foreach ($children as $name => $child) {
            $group->addRoute(
                $this->createRoute($serviceLocator, $child),
                $name
            );
        }

        return $group;
    }
protected function createGroup ( ServiceLocatorInterface $ serviceLocator , RouteInterface $ route , array $ children , bool $ abstract = null ) : RouteInterface { /** @var GroupRoute $group */ $ group = $ serviceLocator -> getService ( GroupRoute :: class , [ 'route' => $ route , 'abstract' => $ abstract , ] ) ; foreach ( $ children as $ name => $ child ) { $ group -> addRoute ( $ this -> createRoute ( $ serviceLocator , $ child ) , $ name ) ; } return $ group ; }
Create group route.

@param ServiceLocatorInterface $serviceLocator
@param RouteInterface          $route
@param array                   $children
@param bool|null               $abstract
@return RouteInterface
@throws ServiceLocatorException
Create group route .