PHP code example of dlapps / sitemap-bundle

1. Go to this page and download the library: Download dlapps/sitemap-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dlapps / sitemap-bundle example snippets

 php
$bundles = [
    new DL\SitemapBundle\DLSitemapBundle(),
]
 php
$container->get('sitemap_resource_builder')
    ->withTitle($title)
    ->withAbsoluteLocation($location)
    ->withLastModified($lastModified) # \DateTime
    ->withChangeFrequency(ChangeFrequencyEnum::WEEKLY)
    ->withPriority(0.5)
    ->build();