Zend Framework
3.0
|
Helper for printing sitemaps. More...
Public Member Functions | |
__invoke ($container=null) | |
Helper entry point. | |
render ($container=null) | |
Renders helper. | |
getDomSitemap (AbstractContainer $container=null) | |
Returns a DOMDocument containing the Sitemap XML for the given container. | |
url (AbstractPage $page) | |
Returns an escaped absolute URL for the given page. | |
setFormatOutput ($formatOutput=true) | |
Sets whether XML output should be formatted. | |
getFormatOutput () | |
Returns whether XML output should be formatted. | |
setServerUrl ($serverUrl) | |
Sets server url (scheme and host-related stuff without request URI) | |
getServerUrl () | |
Returns server URL. | |
setUseSitemapValidators ($useSitemapValidators) | |
Sets whether sitemap should be validated using Zend*. | |
getUseSitemapValidators () | |
Returns whether sitemap should be validated using Zend*. | |
setUseSchemaValidation ($schemaValidation) | |
Sets whether sitemap should be schema validated when generated. | |
getUseSchemaValidation () | |
Returns true if sitemap should be schema validated when generated. | |
setUseXmlDeclaration ($useXmlDecl) | |
Sets whether the XML declaration should be used in output. | |
getUseXmlDeclaration () | |
Returns whether the XML declaration should be used in output. | |
Public Member Functions inherited from AbstractHelper | |
__call ($method, array $arguments=[]) | |
Magic overload: Proxy calls to the navigation container. | |
__toString () | |
Magic overload: Proxy to render(). | |
accept (AbstractPage $page, $recursive=true) | |
Determines whether a page should be accepted when iterating. | |
setAcl (Acl\AclInterface $acl=null) | |
Sets ACL to use when iterating pages. | |
getAcl () | |
Returns ACL or null if it isn't set using setAcl() or setDefaultAcl(). | |
hasAcl () | |
Checks if the helper has an ACL instance. | |
setEventManager (EventManagerInterface $events) | |
Set the event manager. | |
getEventManager () | |
Get the event manager, if present. | |
setContainer ($container=null) | |
Sets navigation container the helper operates on by default. | |
getContainer () | |
Returns the navigation container helper operates on by default. | |
hasContainer () | |
Checks if the helper has a container. | |
setIndent ($indent) | |
Set the indentation string for using in render(), optionally a number of spaces to indent with. | |
getIndent () | |
Returns indentation. | |
setMaxDepth ($maxDepth=null) | |
Sets the maximum depth a page can have to be included when rendering. | |
getMaxDepth () | |
Returns maximum depth a page can have to be included when rendering. | |
setMinDepth ($minDepth=null) | |
Sets the minimum depth a page must have to be included when rendering. | |
getMinDepth () | |
Returns minimum depth a page must have to be included when rendering. | |
setRenderInvisible ($renderInvisible=true) | |
Render invisible items? | |
getRenderInvisible () | |
Return renderInvisible flag. | |
setRole ($role=null) | |
Sets ACL role(s) to use when iterating pages. | |
getRole () | |
Returns ACL role to use when iterating pages, or null if it isn't set using setRole() or setDefaultRole(). | |
hasRole () | |
Checks if the helper has an ACL role. | |
setServiceLocator (ContainerInterface $serviceLocator) | |
Set the service locator. | |
getServiceLocator () | |
Get the service locator. | |
setUseAcl ($useAcl=true) | |
Sets whether ACL should be used. | |
getUseAcl () | |
Returns whether ACL should be used. | |
Public Member Functions inherited from AbstractHtmlElement | |
getClosingBracket () | |
Get the tag closing bracket. | |
Public Member Functions inherited from AbstractHelper | |
setView (Renderer $view) | |
Set the View object. | |
getView () | |
Get the view object. | |
Public Attributes | |
const | SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9' |
const | SITEMAP_XSD = 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd' |
Protected Member Functions | |
xmlEscape ($string) | |
Escapes string for XML usage. | |
Protected Member Functions inherited from AbstractHelper | |
parseContainer (&$container=null) | |
Verifies container and eventually fetches it from service locator if it is a string. | |
isAllowed ($params) | |
Determines whether a page should be allowed given certain parameters. | |
getWhitespace ($indent) | |
Retrieve whitespace representation of $indent. | |
htmlAttribs ($attribs) | |
Converts an associative array to a string of tag attributes. | |
translate ($message, $textDomain=null) | |
Translate a message (for label, title, …) | |
normalizeId ($value) | |
Normalize an ID. | |
setDefaultListeners () | |
Attaches default ACL listeners, if ACLs are in use. | |
Protected Member Functions inherited from AbstractHtmlElement | |
isXhtml () | |
Is doctype XHTML? | |
htmlAttribs ($attribs) | |
Converts an associative array to a string of tag attributes. | |
normalizeId ($value) | |
Normalize an ID. | |
Protected Attributes | |
$formatOutput = false | |
$serverUrl | |
$urls = [] | |
$useSitemapValidators = true | |
$useSchemaValidation = false | |
$useXmlDeclaration = true | |
Protected Attributes inherited from AbstractHelper | |
$events | |
$container | |
$minDepth | |
$maxDepth | |
$indent = '' | |
$acl | |
$renderInvisible = false | |
$role | |
$serviceLocator | |
$useAcl = true | |
Protected Attributes inherited from AbstractHtmlElement | |
$closingBracket = null | |
Protected Attributes inherited from AbstractHelper | |
$view = null | |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractHelper | |
static | setDefaultAcl (Acl\AclInterface $acl=null) |
Sets default ACL to use if another ACL is not explicitly set. | |
static | setDefaultRole ($role=null) |
Sets default ACL role(s) to use when iterating pages if not explicitly set later with setRole(). | |
Static Protected Attributes inherited from AbstractHelper | |
static | $defaultAcl |
static | $defaultRole |
Helper for printing sitemaps.
__invoke | ( | $container = null | ) |
getDomSitemap | ( | AbstractContainer | $container = null | ) |
Returns a DOMDocument containing the Sitemap XML for the given container.
AbstractContainer | $container | [optional] container to get breadcrumbs from, defaults to what is registered in the helper |
Exception\RuntimeException | 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 |
getFormatOutput | ( | ) |
Returns whether XML output should be formatted.
getServerUrl | ( | ) |
Returns server URL.
getUseSchemaValidation | ( | ) |
Returns true if sitemap should be schema validated when generated.
getUseSitemapValidators | ( | ) |
Returns whether sitemap should be validated using Zend*.
getUseXmlDeclaration | ( | ) |
Returns whether the XML declaration should be used in output.
render | ( | $container = null | ) |
Renders helper.
Implements HelperInterface::render().
AbstractContainer | $container | [optional] container to render. Default is to render the container registered in the helper. |
Implements HelperInterface.
setFormatOutput | ( | $formatOutput = true | ) |
setServerUrl | ( | $serverUrl | ) |
Sets server url (scheme and host-related stuff without request URI)
string | $serverUrl |
Exception\InvalidArgumentException |
setUseSchemaValidation | ( | $schemaValidation | ) |
Sets whether sitemap should be schema validated when generated.
bool | $schemaValidation |
setUseSitemapValidators | ( | $useSitemapValidators | ) |
setUseXmlDeclaration | ( | $useXmlDecl | ) |
Sets whether the XML declaration should be used in output.
bool | $useXmlDecl |
url | ( | AbstractPage | $page | ) |
Returns an escaped absolute URL for the given page.
AbstractPage | $page |
|
protected |
Escapes string for XML usage.
string | $string |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9' |
const SITEMAP_XSD = 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd' |