public function build($basepath, $language = null)
    {
        $sitemapElements = [];

        foreach ($this->sitemapElementGenerators as $sitemapElementGenerator) {
            $sitemapElements = array_merge(
                $sitemapElements,
                $sitemapElementGenerator->generateElements($language)
            );
        }

        $data = $this
            ->sitemapRenderer
            ->render($sitemapElements, $basepath);

        return $data;
    }
public function build($basepath, $language = null)
    {
        $sitemapElements = [];

        foreach ($this->sitemapElementGenerators as $sitemapElementGenerator) {
            $sitemapElements = array_merge(
                $sitemapElements,
                $sitemapElementGenerator->generateElements($language)
            );
        }

        $data = $this
            ->sitemapRenderer
            ->render($sitemapElements, $basepath);

        return $data;
    }
public function build ( $ basepath , $ language = null ) { $ sitemapElements = [ ] ; foreach ( $ this -> sitemapElementGenerators as $ sitemapElementGenerator ) { $ sitemapElements = array_merge ( $ sitemapElements , $ sitemapElementGenerator -> generateElements ( $ language ) ) ; } $ data = $ this -> sitemapRenderer -> render ( $ sitemapElements , $ basepath ) ; return $ data ; }
Build sitemap builder.

@param string      $basepath Base path
@param string|null $language Language

@return string Generated data
Build sitemap builder .