Beispiel #1
0
 /**
  * This event is triggered when properties are requested for nodes.
  *
  * This allows us to inject any sharings-specific properties.
  *
  * @param PropFind $propFind
  * @param INode $node
  * @return void
  */
 function propFind(PropFind $propFind, INode $node)
 {
     if ($node instanceof ISharedNode) {
         $propFind->handle('{DAV:}share-access', function () use($node) {
             return new Property\ShareAccess($node->getShareAccess());
         });
         $propFind->handle('{DAV:}invite', function () use($node) {
             return new Property\Invite($node->getInvites());
         });
         $propFind->handle('{DAV:}share-resource-uri', function () use($node) {
             return new Property\Href($node->getShareResourceUri());
         });
     }
 }