minor fixes

This commit is contained in:
Robin Appelman 2022-04-11 14:52:12 +02:00
commit acb32ab84d
15 changed files with 60 additions and 47 deletions

View file

@ -23,6 +23,7 @@ namespace SearchDAV\XML;
use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
use SearchDAV\Backend\SearchPropertyDefinition;
class PropDesc implements XmlSerializable {
/**
@ -46,6 +47,13 @@ class PropDesc implements XmlSerializable {
*/
public $sortable;
public function __construct(SearchPropertyDefinition $propertyDefinition) {
$this->dataType = $propertyDefinition->dataType;
$this->sortable = $propertyDefinition->sortable;
$this->selectable = $propertyDefinition->selectable;
$this->searchable = $propertyDefinition->searchable;
}
public function xmlSerialize(Writer $writer): void {
$data = [
'{DAV:}dataType' => [$this->dataType => null]