1257. Class

1257.1. Zend\View\Helper\Navigation\Sitemap

Helper for printing sitemaps

1257.1.1. Methods

1257.1.1.1. __invoke

__invoke()

Helper entry point

Parameters:string|AbstractContainer – container to operate on
Return type:Sitemap

1257.1.1.2. setFormatOutput

setFormatOutput()

Sets whether XML output should be formatted

Parameters:bool – [optional] whether output should be formatted. Default is true.
Return type:Sitemap fluent interface, returns self

1257.1.1.3. getFormatOutput

getFormatOutput()

Returns whether XML output should be formatted

Return type:bool whether XML output should be formatted

1257.1.1.4. setUseXmlDeclaration

setUseXmlDeclaration()

Sets whether the XML declaration should be used in output

Parameters:bool – whether XML declaration should be rendered
Return type:Sitemap fluent interface, returns self

1257.1.1.5. getUseXmlDeclaration

getUseXmlDeclaration()

Returns whether the XML declaration should be used in output

Return type:bool whether the XML declaration should be used in output

1257.1.1.6. setUseSitemapValidators

setUseSitemapValidators()

Sets whether sitemap should be validated using ZendValidateSitemap_*

Parameters:bool – whether sitemap validators should be used
Return type:Sitemap fluent interface, returns self

1257.1.1.7. getUseSitemapValidators

getUseSitemapValidators()

Returns whether sitemap should be validated using ZendValidateSitemap_*

Return type:bool whether sitemap should be validated using validators

1257.1.1.8. setUseSchemaValidation

setUseSchemaValidation()

Sets whether sitemap should be schema validated when generated

Parameters:bool – whether sitemap should validated using XSD Schema
Return type:Sitemap

1257.1.1.9. getUseSchemaValidation

getUseSchemaValidation()

Returns true if sitemap should be schema validated when generated

Return type:bool

1257.1.1.10. setServerUrl

setServerUrl()

Sets server url (scheme and host-related stuff without request URI)

E.g. http://www.example.com

Parameters:string – server URL to set (only scheme and host)
Return type:Sitemap fluent interface, returns self
Throws :ExceptionInvalidArgumentException if invalid server URL

1257.1.1.11. getServerUrl

getServerUrl()

Returns server URL

Return type:string server URL

1257.1.1.12. xmlEscape

xmlEscape()

Escapes string for XML usage

Parameters:string – string to escape
Return type:string escaped string

1257.1.1.13. url

url()

Returns an escaped absolute URL for the given page

Parameters:AbstractPage – page to get URL from
Return type:string

1257.1.1.14. getDomSitemap

getDomSitemap()

Returns a DOMDocument containing the Sitemap XML for the given container

Parameters:AbstractContainer – [optional] container to get breadcrumbs from, defaults to what is registered in the helper
Return type:DOMDocument DOM representation of the container
Throws :ExceptionRuntimeException if schema validation is on and the sitemap is invalid according to the sitemap schema, or if sitemap validators are used and the loc element fails validation

1257.1.1.15. render

render()

Renders helper

Implements {@link HelperInterface::render()}.

Parameters:AbstractContainer – [optional] container to render. Default is to render the container registered in the helper.
Return type:string helper output

1257.1.2. Constants

1257.1.2.1. SITEMAP_NS

Namespace for the <urlset> tag

1257.1.2.2. SITEMAP_XSD

Schema URL