public function generate(RouterInterface $router)
    {
        $routes = $router->getRouteCollection();
        $pagesDir = $this->configurationHandler->pagesDir();
        $homepageValues = array(
            '_locale' => $this->configurationHandler->language(),
            'country' => $this->configurationHandler->country(),
            'page' => $this->configurationHandler->homepage(),
        );

        $homeRouteName = '_home_' . $homepageValues["_locale"] . '_' . $homepageValues["country"] . '_' . $homepageValues["page"];
        $this->routes["homepage"] = $homeRouteName;
        if ($this->explicitHomepageRoute) {
            $values = array_merge($homepageValues, array('_controller' => $this->frontController,));
            $routes->add($homeRouteName, new Route($this->pattern, $values));
        }

        $seoFileName = 'seo.json';
        if (null !== $this->contributor) {
            $seoFileName = $this->contributor . '.json';
        }

        $finder = new Finder();
        $pages = $finder->directories()->depth(0)->in($pagesDir);
        foreach ($pages as $page) {
            $this->generateLanguagesRoutes($routes, $page, $seoFileName);
        }
    }
public function generate(RouterInterface $router)
    {
        $routes = $router->getRouteCollection();
        $pagesDir = $this->configurationHandler->pagesDir();
        $homepageValues = array(
            '_locale' => $this->configurationHandler->language(),
            'country' => $this->configurationHandler->country(),
            'page' => $this->configurationHandler->homepage(),
        );

        $homeRouteName = '_home_' . $homepageValues["_locale"] . '_' . $homepageValues["country"] . '_' . $homepageValues["page"];
        $this->routes["homepage"] = $homeRouteName;
        if ($this->explicitHomepageRoute) {
            $values = array_merge($homepageValues, array('_controller' => $this->frontController,));
            $routes->add($homeRouteName, new Route($this->pattern, $values));
        }

        $seoFileName = 'seo.json';
        if (null !== $this->contributor) {
            $seoFileName = $this->contributor . '.json';
        }

        $finder = new Finder();
        $pages = $finder->directories()->depth(0)->in($pagesDir);
        foreach ($pages as $page) {
            $this->generateLanguagesRoutes($routes, $page, $seoFileName);
        }
    }
public function generate ( RouterInterface $ router ) { $ routes = $ router -> getRouteCollection ( ) ; $ pagesDir = $ this -> configurationHandler -> pagesDir ( ) ; $ homepageValues = array ( '_locale' => $ this -> configurationHandler -> language ( ) , 'country' => $ this -> configurationHandler -> country ( ) , 'page' => $ this -> configurationHandler -> homepage ( ) , ) ; $ homeRouteName = '_home_' . $ homepageValues [ "_locale" ] . '_' . $ homepageValues [ "country" ] . '_' . $ homepageValues [ "page" ] ; $ this -> routes [ "homepage" ] = $ homeRouteName ; if ( $ this -> explicitHomepageRoute ) { $ values = array_merge ( $ homepageValues , array ( '_controller' => $ this -> frontController , ) ) ; $ routes -> add ( $ homeRouteName , new Route ( $ this -> pattern , $ values ) ) ; } $ seoFileName = 'seo.json' ; if ( null !== $ this -> contributor ) { $ seoFileName = $ this -> contributor . '.json' ; } $ finder = new Finder ( ) ; $ pages = $ finder -> directories ( ) -> depth ( 0 ) -> in ( $ pagesDir ) ; foreach ( $ pages as $ page ) { $ this -> generateLanguagesRoutes ( $ routes , $ page , $ seoFileName ) ; } }
Generates the routes

@return array
Generates the routes