Controller/SitemapController.php
protected function fillSitemapIndex( $sitemap, $numberOfResults, $root )
    {
        $numberOfPage = (int)ceil( $numberOfResults / static::PACKET_MAX );
        for ( $sitemapNumber = 1; $sitemapNumber <= $numberOfPage; $sitemapNumber++ )
        {
            $sitemapElt       = $sitemap->createElement( "sitemap" );
            $locUrl           = $this->generateUrl( "_novaseo_sitemap_page", [ "page" => $sitemapNumber ], UrlGeneratorInterface::ABSOLUTE_URL );
            $loc              = $sitemap->createElement( "loc", $locUrl );
            $date             = new DateTime();
            $modificationDate = $date->format( 'c' );
            $mod              = $sitemap->createElement( 'lastmod', $modificationDate );
            $sitemapElt->appendChild( $loc );
            $sitemapElt->appendChild( $mod );
            $root->appendChild( $sitemapElt );
        }
    }
protected function fillSitemapIndex( $sitemap, $numberOfResults, $root )
    {
        $numberOfPage = (int)ceil( $numberOfResults / static::PACKET_MAX );
        for ( $sitemapNumber = 1; $sitemapNumber <= $numberOfPage; $sitemapNumber++ )
        {
            $sitemapElt       = $sitemap->createElement( "sitemap" );
            $locUrl           = $this->generateUrl( "_novaseo_sitemap_page", [ "page" => $sitemapNumber ], UrlGeneratorInterface::ABSOLUTE_URL );
            $loc              = $sitemap->createElement( "loc", $locUrl );
            $date             = new DateTime();
            $modificationDate = $date->format( 'c' );
            $mod              = $sitemap->createElement( 'lastmod', $modificationDate );
            $sitemapElt->appendChild( $loc );
            $sitemapElt->appendChild( $mod );
            $root->appendChild( $sitemapElt );
        }
    }
protected function fillSitemapIndex ( $ sitemap , $ numberOfResults , $ root ) { $ numberOfPage = ( int ) ceil ( $ numberOfResults / static :: PACKET_MAX ) ; for ( $ sitemapNumber = 1 ; $ sitemapNumber <= $ numberOfPage ; $ sitemapNumber ++ ) { $ sitemapElt = $ sitemap -> createElement ( "sitemap" ) ; $ locUrl = $ this -> generateUrl ( "_novaseo_sitemap_page" , [ "page" => $ sitemapNumber ] , UrlGeneratorInterface :: ABSOLUTE_URL ) ; $ loc = $ sitemap -> createElement ( "loc" , $ locUrl ) ; $ date = new DateTime ( ) ; $ modificationDate = $ date -> format ( 'c' ) ; $ mod = $ sitemap -> createElement ( 'lastmod' , $ modificationDate ) ; $ sitemapElt -> appendChild ( $ loc ) ; $ sitemapElt -> appendChild ( $ mod ) ; $ root -> appendChild ( $ sitemapElt ) ; } }
Fill the sitemap index

@param DOMDocument $sitemap
@param integer     $numberOfResults
@param DOMElement  $root
Fill the sitemap index