76 $this->
serializePriv($writer,
'{DAV:}all', [
'aggregates' => $this->privileges]);
96 $traverse =
function($privName, $priv) use (&$traverse, $html) {
99 if (isset($priv[
'abstract']) && $priv[
'abstract']) {
100 echo " <i>(abstract)</i>";
102 if (isset($priv[
'description'])) {
103 echo " " . $html->
h($priv[
'description']);
105 if (isset($priv[
'aggregates'])) {
107 foreach ($priv[
'aggregates'] as $subPrivName => $subPriv) {
108 $traverse($subPrivName, $subPriv);
116 echo "<ul class=\"tree\">";
117 $traverse(
'{DAV:}all', [
'aggregates' => $this->
getValue()]);
120 return ob_get_clean();
142 $writer->endElement();
144 if (!empty($privilege[
'abstract'])) {
147 if (!empty($privilege[
'description'])) {
148 $writer->
writeElement(
'{DAV:}description', $privilege[
'description']);
150 if (isset($privilege[
'aggregates'])) {
151 foreach ($privilege[
'aggregates'] as $subPrivName => $subPrivilege) {
156 $writer->endElement();
Objects implementing XmlSerializable can control how they are represented in Xml. ...
xmlSerialize(Writer $writer)
The xmlSerialize method is called during xml writing.
__construct(array $privileges)
Constructor.
serializePriv(Writer $writer, $privName, $privilege)
Serializes a property.
startElement($name)
Opens a new element.
WebDAV properties that implement this interface are able to generate their own html output for the br...
SupportedPrivilegeSet property.
xmlName($element)
This method takes an xml element in clark-notation, and turns it into a shortened version with a pref...
toHtml(HtmlOutputHelper $html)
Generate html representation for this value.
h($input)
Escape string for HTML output.
writeElement($name, $content=null)
Write a full element tag and it's contents.
This class provides a few utility functions for easily generating HTML for the browser plugin...
getValue()
Returns the privilege value.