HtmlOutputHelper
This class provides a few utility functions for easily generating HTML for the browser plugin.
- Full name:
\Sabre\DAV\Browser\HtmlOutputHelper
Properties
baseUri
Link to the root of the application.
namespaceMap
List of xml namespaces.
Methods
__construct
Creates the object.
baseUri must point to the root of the application. This will be used to easily generate links.
The namespaceMap contains an array with the list of xml namespaces and their prefixes. WebDAV uses a lot of XML with complex namespaces, so that can be used to make output a lot shorter.
Parameters:
Parameter | Type | Description |
---|---|---|
$baseUri |
string | |
$namespaceMap |
array |
fullUrl
Generates a 'full' url based on a relative one.
For relative urls, the base of the application is taken as the reference url, not the 'current url of the current request'.
Absolute urls are left alone.
Parameters:
Parameter | Type | Description |
---|---|---|
$path |
string |
h
Escape string for HTML output.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
scalar |
link
Generates a full -tag.
Url is automatically expanded. If label is not specified, we re-use the url.
Parameters:
Parameter | Type | Description |
---|---|---|
$url |
string | |
$label |
string |
xmlName
This method takes an xml element in clark-notation, and turns it into a shortened version with a prefix, if it was a known namespace.
Parameters:
Parameter | Type | Description |
---|---|---|
$element |
string |
Automatically generated on 2025-03-18