Skip to content

Extension points

phil/sitemap-bundle

What an application implements, listens to, configures or relies on. The types of pages and sections are phil/sitemap's. See Pages.

Providers

A service implementing Phil\Sitemap\UrlProvider is tagged phil_sitemap.url_provider by autoconfiguration, with after: RouteUrlProvider::class, so that the pages of the routes come first. A bundle that tags its providers by hand names RouteUrlProvider::class in the tag's after to keep that order. Asked for one section, a provider may return early.

Events

EventWhenWhat a listener does
Phil\SitemapBundle\Infrastructure\PopulateSitemapAfter the routes and the providers, each time a sitemap is builtAdds pages to $event->urls; $event->section is the section asked for, or null for all

Route options

The sitemap option of a route — true, or priority, changefreq, lastmod and section — makes its page without a line of PHP; route_options: false turns them off.

Configuration

OptionWhat it extends
default_sectionThe section of a route that names none
items_by_setThe most pages a file holds
dump_directoryWhere phil:sitemap:dump writes
cache_max_ageHow long a served sitemap may be cached
defaultsThe priority, change frequency and last modification of a route that gives none

Services

ServiceHow an application relies on it
Phil\SitemapBundle\Infrastructure\SitemapsInjected to build a sitemap in code; public
The routes phil_sitemap_index and phil_sitemap_fileImported where the application wants /sitemap.xml served — see Installation