Skip to content

Commit 66cd238

Browse files
AntDavidLimavitormattos
authored andcommitted
feat(files-app-integration): create and register stub plugin
Signed-off-by: David Lima <[email protected]>
1 parent 71943b8 commit 66cd238

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

appinfo/info.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,13 @@ Developed with ❤️ by [LibreCode](https://librecode.coop). Help us transform
9090
<route>libresign.page.index</route>
9191
</navigation>
9292
</navigations>
93+
<sabre>
94+
<plugins>
95+
<plugin>OCA\Libresign\Dav\SignatureStatusPlugin</plugin>
96+
</plugins>
97+
</sabre>
98+
<types>
99+
<filesystem/>
100+
<dav/>
101+
</types>
93102
</info>

lib/Dav/SignatureStatusPlugin.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace OCA\Libresign\Dav;
4+
5+
use Sabre\DAV\INode;
6+
use Sabre\DAV\PropFind;
7+
use Sabre\DAV\Server;
8+
use Sabre\DAV\ServerPlugin;
9+
10+
class SignatureStatusPlugin extends ServerPlugin {
11+
protected $server;
12+
13+
public function initialize(Server $server) {
14+
$this->server = $server;
15+
$server->on('propFind', [$this, 'propFind']);
16+
}
17+
18+
public function propFind(PropFind $propFind, INode $node) {
19+
$propFind->handle('{http://nextcloud.org/ns}node-name', $node->getName());
20+
}
21+
}

0 commit comments

Comments
 (0)