nextcloud/lib/public/Files/Events/BeforeRemotePropfindEvent.php
Benjamin Frueh 9d4b11587e feat(dav): allow extending propfind properties via event
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

Update lib/public/Files/Events/BeforePropfindEvent.php

Co-authored-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>

Update lib/public/Files/Events/BeforePropfindEvent.php

Co-authored-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>

refactor: rename BeforePropfindEvent to BeforeRemotePropfindEvent

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

chore: update composer autoloader for new event class

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

Update lib/public/Files/Events/BeforeRemotePropfindEvent.php

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>
2026-02-02 11:45:10 +01:00

42 lines
870 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Files\Events;
use OCP\EventDispatcher\Event;
/**
* This event is fired before a PROPFIND request is sent to remote WebDAV storage
* Used to extend the list of properties to request additional data from the remote server
*
* @since 33.0.0
*/
class BeforeRemotePropfindEvent extends Event {
public function __construct(
private array $properties,
) {
parent::__construct();
}
/**
* @return array<string>
* @since 33.0.0
*/
public function getProperties(): array {
return $this->properties;
}
/**
* @param array<string> $properties
* @since 33.0.0
*/
public function addProperties(array $properties): void {
array_push($this->properties, ...$properties);
}
}