SitemapGenerator
class SitemapGenerator (View source)
Class to be used to generate the elements to be included in a sitemap.xml file.
Properties
protected Application | $app | ||
protected Repository | $config | ||
protected string | $customSiteCanonicalUrl | ||
private PageListGenerator|null | $pageListGenerator | ||
private ResolverManagerInterface|null | $resolverManager | ||
private PageKey|null|false | $sitemapChangeFrequencyAttributeKey | ||
private PageKey|null|false | $sitemapPriorityAttributeKey | ||
private string|false | $defaultChangeFrequency | ||
private string|false | $defaultPriority |
Methods
No description
No description
No description
Get the currently configured canonical URL of the site.
Get the custom canonical URL for the site.
Set the custom canonical URL for the site.
Resolve an URL using the custom site canonical URL (if set).
No description
No description
No description
No description
Don't use with generators!
Details
__construct(Application $app, Repository $config)
Initialize the instance.
PageListGenerator
getPageListGenerator()
No description
setPageListGenerator(PageListGenerator $pageListGenerator)
No description
ResolverManagerInterface
getResolverManager()
No description
setResolverManager(ResolverManagerInterface $resolverManager)
No description
SitemapElement[]|Generator
generateContents()
No description
string
getSiteCanonicalUrl()
Get the currently configured canonical URL of the site.
string
getCustomSiteCanonicalUrl()
Get the custom canonical URL for the site.
$this
setCustomSiteCanonicalUrl(string $customSiteCanonicalUrl)
Set the custom canonical URL for the site.
URLInterface
resolveUrl(array $args)
Resolve an URL using the custom site canonical URL (if set).
protected PageKey|null
getSitemapChangeFrequencyAttributeKey()
No description
protected PageKey|null
getSitemapPriorityAttributeKey()
No description
protected string
getDefaultChangeFrequency()
No description
protected string
getDefaultPriority()
No description
protected URLInterface
getPageUrl(Page $page)
No description
protected string
getPageChangeFrequency(Page $page)
No description
protected string
getPagePriority(Page $page)
No description
protected SitemapPage
createSitemapPage(Page $page, bool $multilingualEnabled)
No description
protected
populateLanguageAlternatives(SitemapPage $sitemapPage)
No description
protected
withCustomCanonicalUrl(callable $run)
Don't use with generators!