76 $this->
serializePriv($writer,
'{DAV:}all', [
'aggregates' => $this->privileges]);
96 $traverse =
function($privName, $priv) use (&$traverse,
$html) {
98 echo
$html->xmlName($privName);
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();
An exception for terminatinating execution or to throw for unit testing.
SupportedPrivilegeSet property.
serializePriv(Writer $writer, $privName, $privilege)
Serializes a property.
xmlSerialize(Writer $writer)
The xmlSerialize method is called during xml writing.
__construct(array $privileges)
Constructor.
toHtml(HtmlOutputHelper $html)
Generate html representation for this value.
getValue()
Returns the privilege value.
This class provides a few utility functions for easily generating HTML for the browser plugin.
writeElement($name, $content=null)
Write a full element tag and it's contents.
startElement($name)
Opens a new element.
WebDAV properties that implement this interface are able to generate their own html output for the br...
Objects implementing XmlSerializable can control how they are represented in Xml.